|
|
|
|
|
by fuzionmonkey
3951 days ago
|
|
One thing worth mentioning about class composition with CSS Modules is it allows for the convenient ergonomics of Sass's @extend without any of its problems. Sass @extend is actually counterproductive in terms of reducing filesize [1] and results in unwieldy, unreadable CSS rules [2]. In contrast, CSS Modules achieves true class reusability and optimal de-duplication of styles in a manner impossible with Sass, resulting in a nice Chrome Inspector view because the original classes are preserved and their composition is naturally represented. [1] https://tech.bellycard.com/blog/sass-mixins-vs-extends-the-d... [2] http://pressupinc.com/blog/2014/11/dont-overextend-yourself-... |
|