3 ms·
I feel like a lot of the fear of nesting came about in the era when you couldn't do direct-child selection reliably. I'm pretty sure this is something that was
by stormbrew 13y ago
I feel like a lot of the fear of nesting came about in the era when you couldn't do direct-child selection reliably. I'm pretty sure this is something that was overcome a long time ago now, though. It's a lot easier to limit and control the application possibilities with:
.blah > .blorp
than it is with
.blah .blorp
without resorting to .blah-blorp prefixing.
- alanh 13y agoYes! True. And it’s easy to do this with Sass (here, shown in SCSS syntax): .my-class { font-weight: bold; // use "placeholder selector": & > .other-class { // selector compiles to: // .my-class > .other-class border-width: 0; } }