The modifiers update marks the next major version of BaseWeb. There has been a re-write of how components and their modifiers are built.
One thing I’ve noticed while writing components is that there is something very similar about how they get modifiers. Typically a component will have a make-[component]
mixin which would output the base styles and then some variation of add-[component]-style
modifier mixins. This resulted in a lot of unique mixins over the span of components that essentially do the same thing—override or add on to the base styles.
So in an attempt to simplify this process and reduce the amount of mixin bloat across components, I’ve introduced two new mixins: add-styles
and add-modifiers
. This also led to a standardized way of writing component variable maps as well.
The Updates
- New add-styles mixin
- New add-modifiers mixin
- New chips element component
- New badges block component
- Added chips support for notices block
- Added chips support for off-canvas block
- Updated documentation to use new “contents” feature and format
- Dropped the settings directory and merged the core and settings files
- Simplified the settings file and moved media-query and grid system maps into their respective component files
- Added better demo for show-hide utiltiy classes
- Cleaned up the base styles component and moved the grid system call there
- Updated anchor styles
For more details, check out the dev blog: "The Modifiers Update".