@adamwathan thoughts on so-called 'silent' extends in scss, ie, the whole '%class-name' thing? Could that work as a sufficient substitute for the LESS class mixins?
The big issue with extends in my experience is that it changes your source order which can cause unexpected bugs.
I'd stick with regular Sass mixins, and if you want to mix in an existing utility, extract a mixin from that utility and mix it into both the component and the utility.
The trouble with separating concerns in this way is it leads to code bloat and thus performance issues.
There is not one rule to rule them all when it comes to development, this is because one will never satisfy every principal as they often conflict.
A far better methodology is to do what's right for the task at hand rather than rigidly following a principal generated by someone else that possbibly does NOT fit every aspect of the project as a whole.
3 comments
[ 2.1 ms ] story [ 17.6 ms ] threadI'd stick with regular Sass mixins, and if you want to mix in an existing utility, extract a mixin from that utility and mix it into both the component and the utility.
There is not one rule to rule them all when it comes to development, this is because one will never satisfy every principal as they often conflict.
A far better methodology is to do what's right for the task at hand rather than rigidly following a principal generated by someone else that possbibly does NOT fit every aspect of the project as a whole.