Theme as a modifier results in the need to increase specificity
- Dominant language
- JavaScript
- Stars
- 330
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Description
Continuing the conversation with @veged, I want to discuss the issue with theme as a modifier.
Here are cases:
1. To make some block invisible with modifier or mix, user should often use `mustDeps` on lib's theme or somehow increase specificity as there are `display` properties in _theme_islands (e.g. https://github.com/bem/bem-components/blob/v2/design/common.blocks/button/_theme/button_theme_islands.styl#L7).
2. The same issue appear when user wants to create layout with the help of mixes with some layout block as such properties as `margin` and `padding` are set as well (https://github.com/bem/bem-components/blob/v2/design/common.blocks/button/_theme/button_theme_islands.styl#L9-L10).
Maybe someone will find the way to make it better?
Contributor guide
Research direction
Start by reading design/common.blocks/button/_theme/button_theme_islands.styl, especially the referenced display, margin, and padding rules. Review the two examples in the issue and the linked conversation to determine the intended behavior; done means theme modifiers and layout mixes no longer require extra specificity or mustDeps workarounds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- stylus
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100