4 ms·
That code is not more maintainable. You've centralized a single color but now you've duplicated a selector. The single-rule output mode of Sass is an output op
by chriseppstein 17y ago
That code is not more maintainable. You've centralized a single color but now you've duplicated a selector.
The single-rule output mode of Sass is an output optimization mode we plan to add to sass for runtime performance. You should write code the way you think about things and let your tools do the heavy lifting for you.
- nostrademons 17y agoStyles change more often than selector names. If you're using semantic selectors, they shouldn't change much at all. This is a problem with any sort of abstraction. When you write a function in normal code, you duplicate the function name and call signature in exchange for centralizing the body. In Sass, you're presumably duplicating the variable name in exchange for centralizing its definition. The same goes here, except s/variable name/selector/.