I got to blow someone’s mind with CSS again today, which was fun.

One part was an introduction to Selector Specificity, which (in my opinion) is one of the hardest concepts to grasp in CSS, but it seemed to help. 🙌🏻

Gawd, I love that language.

#WebDev #CSS

Edit 4 days later: Deleted the contents of this toot, but keeping it for replies.

The original example code was inaccessible and has now been removed.

@mahryekuh I kinda like css to write greenfield, but after that I completely lose track and I cannot process it 😬

@h5e Huge CSS files are a maze!

The quickest way to find something in such files, when I don't know the exact selector, is to use the browser inspector. The inspector usually points at a filename and line for a specific selector.

I used partials to split up CSS back in my SCSS days, but I quit SCSS.

Luckily, we now have CSS layers, which you can import separately to split your styles across many files.

(Which, of course, only works if you have a logical system for splitting, or you will still lose track of all your stuff.)

@mahryekuh yeah, and the html tree changes often in applications. It’s hard to keep track, especially with multiple people making changes over time. It’s easy to create a chaos. It’s really powerful though, I certainly agree with that.
@h5e ADHD-moment: Ik moet nu denken aan "Ravensburger Doolhof" 😂