Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove requirement for composes to be the first thing #645

Closed
tivac opened this issue Aug 8, 2019 · 1 comment · Fixed by #646
Closed

Remove requirement for composes to be the first thing #645

tivac opened this issue Aug 8, 2019 · 1 comment · Fixed by #646
Labels

Comments

@tivac
Copy link
Owner

tivac commented Aug 8, 2019

Feature Use Case

The current behavior of requiring that composes be the first property comes directly from the CSS Modules Spec:

There can be multiple composes rules, but composes rules must be before other rules.

This made a lot of sense at the time, but there's no technical need for that requirement in modular-css (in fact if we removed it I could delete a bunch of code that enforces the requirement) and there's better tools for specifying very explicit property ordering now like stylelint-order.

Feature Proposal

Remove the logic that enforces that composes be the first property in a declaration, and update the guide on the site to remove any references to the requirement & list it as another divergence from CSS Modules

@tivac tivac added the feature label Aug 8, 2019
@tivac
Copy link
Owner Author

tivac commented Aug 12, 2019

Haven't seen any serious concerns when chatting about this, so working on it now.

tivac added a commit that referenced this issue Aug 12, 2019
Fixes #645

BREAKING CHANGE: previously `modular-css` would require that `composes` be the first declaration in  a rule. This restriction has been removed due to better solutions for enforcing that behavior existing now (stylelint-order).
tivac added a commit that referenced this issue Aug 12, 2019
* feat(processor): allow composes anywhere in a rule

Fixes #645

BREAKING CHANGE: previously `modular-css` would require that `composes` be the first declaration in  a rule. This restriction has been removed due to better solutions for enforcing that behavior existing now (stylelint-order).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant