Re: [csswg-drafts] [css-color-4] Parse-time clip of HSL negative saturation for modern syntax? (#9222)

So what should be done when the lightness exceeds 100%?

This behaves differently in Chrome and Safari.

![Image](https://github.com/user-attachments/assets/a6f16367-f079-41e4-a552-fe8ab9f18405)

```html
data:text/html;charset=UTF-8,<!DOCTYPE html>
<style>
.test {
  display: inline-block;
}
.test div {
  width: 400px;
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  font-size: 14px;
  font-family: sans-serif;
}
.expected {
  background: lime;
}
.test1 {
  background: hsl(120deg 100% 50%);
}
.test2 {
  background: hsl(120deg 800% 50%);
}
.test3 {
  background: hsl(120deg, 800%, 50%);
}
.test4 {
  background: color(display-p3 0 1 0);
}
</style>
<div class="test">
  <div class="expected">This should be a lime background.</div>
  <div class="test1">hsl(120deg 100% 50%), this should be a lime background.</div>
  <div class="test2">hsl(120deg 800% 50%), this should be a lime background.</div>
  <div class="test3">hsl(120deg, 800%, 50%), this should be a lime background.</div>
  <div class="test4">color(display-p3 0 1 0)</div>
</div>
```

-- 
GitHub Notification of comment by yisibl
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9222#issuecomment-2739115425 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 20 March 2025 04:28:21 UTC