doix
2 days ago
Clever use of attribute selectors and the :has selector.
Unfortunately as the article talks about, not every website stores the published date in the same way, so you can't write a generic CSS rule to add increasing levels of sepia to all sites.
Another great use of attribute selectors is to work around mangled CSS names when you're injecting your own CSS into other people's site.
Since so many sites use CSS modules, you'll see classnames like "post_s47mgk". The suffix changing dynamically as they deploy their site randomly.
You can do [class^="post_"] to select that class and it'll remain stable even if the mangler changes the suffix.