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

Autoreset plugin #470

Closed
ai opened this Issue Aug 4, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@ai
Member

ai commented Aug 4, 2015

In BEM we can find a elements rules. Lets add reset stylus to each element rule.

.block_elem {
  color: black;
}
.block_elem.__mod {
  color: white;
}
.block_elem {
  padding: 0;
  /* other reset decls */
  color: black;
}
.block_elem.__mod {
  color: white;
}

Plugin can accepts shouldBeReset callback for custom methodologies:

shouldBeReset: (rule) => !rule.selector.match(/__/)

@ai ai added the plugins label Aug 4, 2015

@ai

This comment has been minimized.

Member

ai commented Aug 28, 2015

@ai ai closed this Aug 28, 2015

@maximkoretskiy

This comment has been minimized.

Contributor

maximkoretskiy commented Aug 28, 2015

=)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment