- From: Benoît Rouleau via GitHub <noreply@w3.org>
- Date: Sat, 11 Oct 2025 18:21:31 +0000
- To: public-css-archive@w3.org
benface has just created a new issue for https://github.com/w3c/csswg-drafts: == A new unit that works like I would expect percentages to work in `background-position` and `mask-position` == ### Problem Too many times I needed `%` in `background-position` and/or `mask-position` to be a lot simpler than [what it actually is](https://developer.mozilla.org/en-US/docs/Web/CSS/background-position#regarding_percentages), and simply be relative to the element's width (for `*-position-x`) or height (for `*-position-y`). Unfortunately, there doesn't seem to be a workaround other than maybe setting a container on a parent element and then using the `cqi` and `cqb` units, but that only works when the dimensions of the element we want to set a background or mask on are fixed and known by that container element. ### Potential solution Yet another new unit, or maybe two (e.g. `w` and `h`), which could be used in any property that doesn't have an effect on the layout. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12934 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 11 October 2025 18:21:31 UTC