cssinjs / jss

JSS is an authoring tool for CSS which uses JavaScript as a host language.
https://cssinjs.org
MIT License
7.08k stars 399 forks source link

fix(jss-plugin-global): Support format option for @global rules #1572

Closed briganti closed 3 years ago

briganti commented 3 years ago

Corresponding Issue(s): #1566

What Would You Like to Add/Fix?

In #1549, I've introduced the format: false option to remove whitespaces when generating CSS. However, I've forgotten to update jss-plugin-global to support it, so as a result, all @global CSS rules were not formatted.

This PR fixes the above issue by making sure the format option is passed to jss-plugin-global rules.

Todo

Expectations on Changes

Indentation and line breaks are removed for @global rules when format: false is passed to SheetsRegistry.toString or rule.toString methods.

Changelog

kof commented 3 years ago

merged, thanks!