Skip to content

Multiple selectors + composition removed

Choose a tag to compare

@tivac tivac released this 31 Jan 07:29
· 1109 commits to main since this release

During some routine development an issue with how modular-css supported composition arose. See #238 for the gory details, but the short version is that code like the following is no longer supported.

.base { background: blue; }
.one .two .three { composes: base; }

The problem is that there's no sane way to export that w/o causing all sorts of potential overlapping disasters. This was actually called out in the CSS Modules Spec and just slipped through the cracks.

So now code like above will throw an error, sorry 😞

On the plus side webpack support now correctly uses their internal assets system, for whatever that's worth! I'm not 100% sure what benefit it brings but now I don't have to write code to save out files so that's a big 👍🏻 from me.