4 comments

  • Tobias ReichTobias Reich, 6 years ago (edited 6 years ago )

    I don't get why I should use mixins for something which can be done without mixins and with less code…

    Here's the Parts Example SCSS from their website without csstyle: https://gist.github.com/electerious/a6ca4813c9cf42ca41df

    The only thing different to the original example: class="button --action" needs to be class="button button--action"

    But that makes it even better to avoid conflicts with other elements using the --action class.

    Is this framework really that senseless or did I miss something?

    5 points
    • Morley ZhiMorley Zhi, 6 years ago

      I'm guessing that the advantage of the mixins is to make the role of each ruleset 100% clear and unambiguous. Standards are easier to enforce the more clear it is when you're following them.

      It's also arguably more readable to see the mixin declaration than the -- and __ and + around the file, in addition to your standard --'s and .'s and #'s.

      It would also have the side effect of reducing the number of errors you get from typing one underscore instead of two.

      2 points
  • Paul BestPaul Best, 6 years ago (edited 6 years ago )

    I like your approach, it re-enforces the need for pattern-based stylesheets. However, there's too much nesting in your code examples.

    Anytime I see four consecutive closing braces "}" as in your "parts" section, giant red flags start flying. The code becomes very difficult to parse as a human.

    1 point
  • David BachmannDavid Bachmann, 6 years ago

    This is really interesting... Gonna give it a try. Thanks for sharing.

    0 points