3 ms·
".ComponentName-descendentName" nested inside ".ComponentName"? Remember kids, the cascade is TEH B4DZORS - so always include everything you would have gotten
by al2o3cr 10y ago
".ComponentName-descendentName" nested inside ".ComponentName"?
Remember kids, the cascade is TEH B4DZORS - so always include everything you would have gotten from it in every class name. headdesk
Solidly delivered on the "no DRY" premise. Maybe they should coin a new acronym like "WET": "Write Everything Thrice"
- vog 10y agoI propose to name it the "wet-wet-wet" principle.
- paulddraper 10y agoWETTT Write Everything Ten Thousand Times
- spdustin 10y ago> "Write Everything Thrice" Solid. I'm using that in my class today. I love React, and even there, I only style components in the way they need to be styled, and not with any other brand-specific styles. Those go in the good ol' fashioned CSS with "gently nested" CSS selectors. The enterprise world is considerably more nuanced than many SPA devs understand. A class of folks from US Gov, manufacturing, pharmaceutical and finance industries (to roll them into general groups) and every one of them answers "IE9" when asked what browser they have to support, and every one of them is at home with "the old ways" of writing CSS, by embracing the cascade. It's not that they're wrong. They're pragmatic. And, In some cases a little bitter, I'll grant you. ;)
- awesomebob 10y agoCRY: Continuously Repeating Yourself WET: Write Everything Twice Credit: https://roots.io/sage/docs/theme-wrapper/#fn2 https://roots.io/sage/docs/theme-wrapper/#fn2 :)
- gr3yh47 10y agoWET is standardly 'Write Every Time'
- Guillaume86 10y agoThe whole point is probably to avoid cascading and issues it creates when you will start to nest different components.
- Roboprog 10y agoWe Enjoy Typing is the explanation I usually see.