Links
Solved with CSS! Logical Styling Based on the Number of Given Elements
How to handle binary (empty) states, advanced numeric selection (eg, style all the items if there's more than three), change the formatting of list based on how many items it contains, etc.
Getting to Know a Legacy Codebase
The kind of codebase that no one person truly understands any more; the kind of codebase that’s had a dozen different contributors over just as many years; the kind of codebase that’s never had a full-scale refactor or overhaul, but that’s grown organically over time and changed with new techniques, styles, and trends.
On Designing and Building Toggle Switches
It was pretty clear to me: the switch would allow a user to choose between a light theme and a dark theme, with the light theme being the default. It was at this moment that radio buttons came to my mind: two options with one of them checked, and only one option can be checked at a time; that makes a great use case for good old radio buttons.
Sometimes `sizes` is quite important
In this case, we're changing the size of the images not just at certain resolutions, but at specific breakpoints as well, which means we're also going to need to use the sizes attribute to get the most out of responsive images. The entire job of the sizes attribute is to tell the browser what size the image will be shown at, as per our CSS.
The frustrations of using CSS Shapes and CSS Exclusions
I don’t like to write ‘moany’ and negative articles. That’s not what you need. But indulge me as I explain my current feelings of woe with CSS Shapes and CSS Exclusions.
Videos
CSS-in-JS: FTW or WTF? by Bruce Lawson
Everyone's talking about CSS-in-JS. It's the Kim Kardashian of web development. And, as with Kimmie, opinions are polarised. To some, CSS in JS just makes sense: it's local to your component, it can't leak and, hey, I know how to write JavaScript and CSS is weird.
To others, CSS-in-JS is an abomination that makes them want to emulate Kimmie and "release a fragrance" in disdain. Why are scripters so afraid of the cascade? Why the hesitance about inheritance?
Let's look at what CSS seems to lack, what the CSS-in-JS libraries can teach us, so we don't do as Kim's buttocks did and "Break the Internet".