• Jansen Tolle, almost 7 years ago (edited almost 7 years ago )

    This is pretty much how I do it.

    What I'm struggling with is the optimal way to do media queries. I prefer to keep them in the same area as the element so that it's easier to grab one bit of code for the whole thing. Something like this. It can get a bit messy though.

    .nav-primary {

    &#{&} {

    /* mobile-first styles */ @media (min-width $break-small) { /* small / tablet styles */ }



    1 point
  • Simon EvansSimon Evans, almost 7 years ago

    Interesting article from Harry. I'm not sure how I feel about this - I'm into keeping specificity flat/uniform, but the method he references seems a little messy.

    0 points
  • Ryan MackRyan Mack, almost 7 years ago (edited almost 7 years ago )

    This can help us working in environments where other developers do not understand how BEM works, or who are prone to just hacking things around until things look right.

    This is the only advantage I see with this, which is actually a really great one. One other negative not mentioned is you're theoretically nearly doubling css file size.

    Anyhow, interesting take—I like the thought behind this.

    0 points