The introduction of the CSS Functions and Mixins Module could reduce the need for preprocessors like Sass, thanks to its ability to loop through lists and keep styles DRY. The new module, still in draft stages, introduces both custom functions and mixins distinctively. Custom functions work like advanced custom properties and offer capabilities such as returning multiple values conditionally. Mixins, akin to those in Sass, enable reusable style blocks but with the new @apply at-rule for embedding styles in CSS rulesets. Various nuances and potential limitations are under discussion within the CSS Working Group.

9m read timeFrom css-tricks.com
Post cover image
Table of contents
Custom functions are advanced custom propertiesMixins help maintain DRY, reusable style blocksThat’s, um, it… at least for now.
1 Comment

Sort: