- From: Bramus via GitHub <sysbot+gh@w3.org>
- Date: Wed, 14 May 2025 20:40:46 +0000
- To: public-css-archive@w3.org
> We'd like to consider a model proposed by [@flackr](https://github.com/flackr): > > * We size the new pseudo to the border box > * We copy `border-width` to the new pseudo from the element that originated it > * We adjust the nested group pseudos to be positioned with the two of the above in mind (ie they may be shifted depending on `border-width` To those wondering what it would look like: this is effectively demo 5 from [the playground](https://codepen.io/bramus/full/EaxvMXG/11b9fcbe8ebf42034110d3b486db037f). For demonstration purposes the transparent border was made `dashed lime` so that you can see it. > This seems like a plausible middle ground: there's no sizing magic in that everything is still technically sized to the border box. Because of automatically copied `border-width` and the relevant nested group position adjustments, adding a clip or rather replicating the shape of the original element's clip is easy. Easy as in: authors as can copy styles such as the `border-radius` and apply them to the new pseudo without needing to adjust the values. > Please share your thoughts! I cannot help but stress that this is the most author-friendly solution we came up with – see the remark about “easy” above. All other explored solutions put an extra burden on authors. One question one could ask here is whether we should animate the border on the new pseudo between the old and new state. I have not dug into this yet, but my gut reaction would be that we do need to animate it because otherwise you’d have nested pseudos jump at the end of the transition. -- GitHub Notification of comment by bramus Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11926#issuecomment-2881510235 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 14 May 2025 20:40:48 UTC