@ppk You can get up to ≈5 separate stylable parts in an image’s fallback alt styling by messing with its width and its ::first-line, ::first-word, ::first-letter, and ::before/after
@ppk I just used .child:not(:where(.exception *)) to escape some styles in the presence of a specific parent selector. That's pretty powerful compared to the explicit reset you'd need before :not() and :where() were available.
@ppk I really dislike the idea that the navigation should be the first thing in the HTML. The content should be the first thing, of course. So I always place the navigation in the footer, where it belongs, since it is metadata.
I do like a "skip to website menu" link at the top. For this you can use the target selector, which moves the navigation to the top at your request and leaves it idling the rest of the time.
Not really a trick, but it would be nice if is was published somewhere.
@ppk I don't think I have anything unique. I like to do :not([class]) when I have no access to layers (which at the moment is basically all the time). Kind of like this:
@ppk if you want to style links based on its URL (e.g. you want a blue color for all links that point to /blog and /blog/*), you can use the attribute selector like so:
a[href*=/blog] { ... }
And it will style all links with an href whose value contains the string "/blog" at least once.
Add comment