4 ms·
No, it's amazing what you can accomplish with CSS now! You used to have to listen for user events with Javascript (later jQuery, around 2006) to add/remove CSS
by grepLeigh 4y ago
No, it's amazing what you can accomplish with CSS now! You used to have to listen for user events with Javascript (later jQuery, around 2006) to add/remove CSS classes. There was no :hover :focus etc.
Today, CSS pseudo-classes cover just about every transition state you need when designing a web application.
I appreciate the approach frameworks like Tailwind are taking to CSS. At first I found it awkward to include so many classes in my markup, but I've come to appreciate the flexibility (without surprising behaviors).
10 years ago, I caused all kinds of headaches for myself by trying to customize .btn with crap like a#sales-promo-1.btn a#sales-promo-2.btn - truly a mess.
- deleted 4y ago[deleted]
- camtarn 4y agoFor anybody who's as confused as I was: :hover and :focus have been around since CSS2, which was released in 1998 ... but Internet Explorer only supported them on links for a long time, not on arbitrary elements, so that was where jQuery came in. Ahh, I really really don't miss those days, and I'm rather happy to have reclaimed the giant chunk of memory that used to hold things like quirks mode and hasLayout.
- grepLeigh 4y agoAhh thank you, I had forgotten the exact details! I still remember the burning frustration like it was yesterday though, hah. CSS/HTML were my gateway into the tech industry though, so I'm glad I pushed through it. In retrospect, I could see why most "real programmers" were happy to push this tedious work over to me.
- bryanrasmussen 4y ago>There was no :hover :focus etc. All those were in the spec in 2006 (ok not sure about focus pseudo selector but I think so, I mean first-line was supported focus must have been), unfortunately due to MS they were not completely implemented for every element they were specified so and thus the jQuery hacks you remember.
- grepLeigh 4y agoThanks for the extra details here! I've largely forgotten everything except the intense feelings of frustration.