- From: Guillaume via GitHub <noreply@w3.org>
- Date: Wed, 24 Sep 2025 07:24:26 +0000
- To: public-css-archive@w3.org
cdoublev has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-backgrounds-3] Can `background` syntax be made more future-proof? == I hope this editorial change can be applied to [`<final-bg-layer>`](https://drafts.csswg.org/css-backgrounds-3/#typedef-final-bg-layer) in CSS Backgrounds 3: ```diff background = <bg-layer>#? , <final-bg-layer> - <final-bg-layer> = <bg-image> || <bg-position> [/ <bg-size>]? || <repeat-style> || <attachment> || <visual-box> || <visual-box> || <'background-color'>` + <final-bg-layer> = <'background-image'> || <'background-position'> [/ <'background-size'>]? || <'background-repeat'> || <'background-attachment'> || <'background-origin'> || <'background-clip'> || <'background-color'>` ``` Basically the same change (omitted for brevity) would apply to `<bg-layer>`. **Why?** (1) [`background-clip`](https://drafts.csswg.org/css-backgrounds-4/#background-clip) is defined with `<bg-clip>` in CSS Backgrounds 4, which produces `<visual-box> | [ border-area || text ]`. But `<*-bg-layer*>` in CSS Backgrounds 3 only accepts `<visual-box>`. By using property value ranges (`<'background-*>`) instead of specific types (`<bg-*>`), the `background` syntax can be decoupled from longhand or type definitions in specific level(s) of the spec. (2) CSS Backgrounds 4 editors could extend `background-repeat` without changing `<repeat-style>` (which is used in `mask` syntax) or creating `<bg-repeat>`. The same applies to `background-attachment` and `<attachment>`, which is however not used elsewhere. (3) `<final-bg-layer>` mixes `<'background-color'>` and `<bg-*>`, which seems inconsitent. (4) `... || <'background-origin'> || <'background-clip'> || ...` helps explaining in which positions are expected the corresponding longhand values. Optionally, `<bg-image>`, `<bg-position>`, `<bg-size>`, could be dropped. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12849 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 24 September 2025 07:24:27 UTC