9 comments

  • Account deleted 6 years ago

    Is all of the finger pointing necessary?

    2 points
    • Colm Tuite, 6 years ago

      Maybe not, I just want to illustrate the point that so many big names are writing poor CSS. My main motivation is constructive though.

      1 point
  • Hamish TaplinHamish Taplin, 6 years ago

    I don't care about the finger-pointing (I find it kind of funny anyway) but the message is appreciated. I waste SO MUCH of my time trying to figure out the best way to do things. I've tried the so-called "semantic" approach of using as little classes as possible in my markup and leveraging SASS mixins/extend to do all the heavy lifting and it just becomes a clusterfuck of selectors. Recently, I've adopted the OOCSS/BEM approach and it's working really well but seems to offload a lot of presentational logic into your views — which isn't ideal either.

    The idea that we all come together and standardise around one way of working (based on some actual metrics) would be awesome.

    1 point
  • Nelson JoyceNelson Joyce, 6 years ago

    So you're proposing that we should write unsemantic CSS?

    Having to use 10 css classes to style up an element kind of defeats the purpose of CSS doesn't it?

    More examples of what I'm talking about: http://css-tricks.com/semantic-class-names/

    0 points
    • Colm Tuite, 6 years ago

      I just used a class based approach in my example for those who aren't familiar with preprocessors yet.

      I'm proposing that we all come together to figure out the most optimal way to apply CSS to each element, then all follow the same approach.

      The article was not about nitpicking on what's right or wrong. It was about outlining how different our approaches are and how we might benefit if we all used one approach.

      Obviously it went straight over most people's heads.

      0 points
      • Nelson JoyceNelson Joyce, 6 years ago

        I agree that it would be useful if we had one approach. Although, the only benefit to structuring HTML/CSS a certain way is for readability and maintainability. Whatever works for your team is cool.

        That being said, spending most of the article pointing fingers and nitpicking is probably why we thought the point of the article was to point fingers and nitpick.

        2 points
  • Andrew LiebchenAndrew Liebchen, 6 years ago

    Mixpanel's CSS could be complied SASS. In app development, sometimes the conciseness of the complied CSS is sacrificed for SASS that is simpler to write and maintain.

    0 points
    • Sacha GreifSacha Greif, 6 years ago

      Seems like they could just replace their @include' by @extend's in that case?

      0 points
      • Andrew LiebchenAndrew Liebchen, 6 years ago

        Yeah definitely (assuming of course they're using SASS and just not writing duplicative code). But the ultimately it doesn't matter THAT much. Using mixins or extends simplifies maintainability in the same way that CSS originally aimed to making styling simple by introducing rulesets. What are mixins and extends other than rulesets that are applied to rulesets.

        It is nice to save the bytes by not having to send duplicative CSS over the wire, for sure.

        0 points