[csswg-drafts] [fill-stroke] Proper "fill" property value definition to replace "<'background'> with modifications"? (#7285)

tidoust has just created a new issue for https://github.com/w3c/csswg-drafts:

== [fill-stroke] Proper "fill" property value definition to replace "<'background'> with modifications"? ==
The [value of the `fill` property](https://drafts.fxtf.org/fill-stroke/#fill-shorthand) is currently defined as "`<'background'>` with modifications". On top of not describing the actual modifications, in all other property definitions, this value needs to be interpreted with the [value definition syntax](https://www.w3.org/TR/css-values/#value-defs), and a literal interpretation would consider that `with` and `modifications` are keywords, not regular spec prose, in other words that one should expect values that include "with modifications", as in:

```css
div {
  fill: #F00 with modifications;
}
```

Could the spec define the value more precisely with actual grammar? Looking at the definition of `<'background'>`, I suppose the intent is to transpose it to the different fill painting properties. Trying to run that exercise, I wonder whether the property value could rather be defined as `[<fill-layer># ,]? <final-fill-layer>` with the following definitions:

```
<fill-layer> = <paint> || <position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>
<final-fill-layer> =  <'fill'> || <paint> || <position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>
```

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7285 using your GitHub account


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

Received on Wednesday, 18 May 2022 14:10:19 UTC