-
Notifications
You must be signed in to change notification settings - Fork 153
Open
Labels
@css-blocks/coreIssue with the core CSS Blocks libraryIssue with the core CSS Blocks libraryenhancementunder considerationA decision is pending.A decision is pending.
Description
I've been wondering if we should have a syntax for creating a state that is shared across all classes.
An example use case for this would be a the gutter and last states for a float-based grid block.
Using Sass, you can create mixins to simplify this process, but I'd like the block syntax to be usable without a preprocessor.
/* example.block.css */
.foo {
margin: 10px;
}
.bar {
margin: 18px;
}
*[state|last] {
margin-right: 0;
}Would then compile to:
.example__foo { margin: 10px; }
.example__bar { margin: 18px; }
.example__foo--last,
.example__bar--last { margin-right: 0; }Maybe it's not common enough to warrant addressing with specialized syntax, but I thought I'd write it down for discussion at some point.
Metadata
Metadata
Assignees
Labels
@css-blocks/coreIssue with the core CSS Blocks libraryIssue with the core CSS Blocks libraryenhancementunder considerationA decision is pending.A decision is pending.