Here’s what I didn’t know about :where() - Manuel Matuzović
I feel like I’m starting to understand how the CSS :where
pseudo-class works and why it’s useful. The cogs are slowly turning in my brain.
I feel like I’m starting to understand how the CSS :where
pseudo-class works and why it’s useful. The cogs are slowly turning in my brain.
This would be such a great addition to CSS—a parent/ancestor selector!
With the combined might of :has()
, :not()
, nth-child()
, and calc()
, CSS has become a powerful language for specifying rules to account for all kinds of situations.
Oh, this is smart! You can’t target pseudo-elements in JavaScript, but you can use custom properties as a proxy instead.
A thorough deep dive into generated content in CSS.
I find myself doing pseudo code before I write real code, sure, but I also leave it in place sometimes in code comments.
Same!
This is a great explanation of the difference between the [lang]
and :lang
CSS selectors. I wouldn’t even have thought’ve the differences so this is really valuable to me.
In which Matthew disects a multiple choice quiz that uses CSS to do some clever logic, using the :checked
pseudo-class and counter-increment
.
Oh, and this is how he realised it wasn’t using JavaScript:
I have JavaScript disabled on my phone because a) it cuts out most of the ads, b) it cuts out lots of bandwidth and I have a limited data plan, and c) my battery lasts longer because it’s not processing tons of code to show me some text (cough, Medium).
A really deep dive into the lang
attribute, and the :lang()
pseudo-class (hitherto unknown to me). This is all proving really useful for a little side project I’m working on.
A deep dive into the :focus
pseudo-class and why it’s important.
A really interesting proposal from Lea that would allow CSS authors to make full use of selectors but without increasing specificity. Great thoughts in the comments too.
An alternative to using the :checked
pseudo-class for sprinkling in some behaviour—you can use the :target
pseudo-class. It might mess up the browser history though.
Everything you ever wanted to know about CSS pseudo-classes (and pseudo-elements).
Here’s a really nifty use of the :checked
behaviour pattern that Charlotte has been writing about—an interface for choosing a note from a piano keyboard. Under the hood, it’s a series of radio buttons and labels.
I like this skewering of the cult of so-called-neuroscience; the self-help book equivalent of eye-tracking.
Simon Singh's newest book is released today. Huzzah! It's called Trick or Treatment? and it's all about "alternative" medicine. Somewhere, Ben Goldacre is smiling.
I've said it before and I'll say it again: the Bad Science blog deserves a medal.
Hilariously stupid pseudo-science article that takes a scythe to the BBC's credibility. Read on to the last line to get the source of this nonsense.