- From: Roman Komarov via GitHub <sysbot+gh@w3.org>
- Date: Sat, 27 Apr 2024 08:30:17 +0000
- To: public-css-archive@w3.org
> The use-cases given so far do want to style the grid item itself, not necessarily a child, tho. Yes, but, in practice, allowing to style children in this way will unlock all of these use-cases, just in a bit clunkier way: - With an ability to modify HTML, you could almost always achieve the same result (always add an extra wrapper). - If we will ever get https://github.com/w3c/csswg-drafts/issues/2406 (`::contents`), then it will become possible to achieve it through CSS without extra HTML or hacks. - With `::before` and `::after` and abspos them with `inset: 0` over a grid item as a fake background, it will be possible with just CSS as well. Are there any other possible venues that could allow us to achieve these use-cases? If the more “desirable” (styling the item itself) are fundamentally unsolvable, then having a simple (just add a wrapper/use a pseudo) solution is infinitely better than no solution. Well, _almost_ no solution: I did write an article about one workaround using scroll-driven animations, [“Position-Driven Styles”](https://kizu.dev/position-driven-styles/), and even mentioned this issue in it, but forgot to backlink. But, if another way is possible, I would love to not rely on wild hacks like that. -- GitHub Notification of comment by kizu Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1943#issuecomment-2080416093 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Saturday, 27 April 2024 08:30:18 UTC