I wrote a new article: âPossible Future CSS: Tree-Counting Functions and Random Valuesâ
https://kizu.dev/tree-counting-and-random/
Many exciting things were added to #CSS specs over the years, but some have yet to be implemented by browser engines.
In this article, I spotlight two features from Level 5 of the CSS Values and Units Working Draft, describe how we can prototype them with what we have in CSS today, and provide several interactive demos of their use cases.
Note: currently, it might not work in mobile Safari. I spent a few hours trying things, the latest dev deploy of my site worked, but the prod one does not.
If you cannot open it by the link about in Safari, a workaround that works for me (but still slow) is to go to https://kizu.dev directly and then go to the article.
Will investigate later again, but oh well. Sorry.
As usual, the credits:
- @argyleink, Jonathan Neal, Giorgio Pretto, Sebastian Malton & Oriol Brufau for CSSWG issues related to `sibling-index()` and `sibling-count()`.
- @tabatkins & Benjamin De Cock for CSSWG issues related to `random()`.
- Michal Äaplygin for an issue about tree-counting functions in Open Props.
- @heydon, @leaverou & @me for Quantity Queries.
- @leaverou and Alex Walker for the articles on cicada principle.
- @kevinpowell for his talk at CSS day.
[1/2]