Modifier classes
See original GitHub issueDo you want to request a feature or report a bug?
feature
What is the expected behavior?
To have the same modifiers syntax as in astroturf
const Button = styled('button')`
color: black;
border: 1px solid black;
background-color: white;
&.primary {
color: blue;
border: 1px solid blue;
}
&.color-green {
color: green;
}
`;
<Button primary color="green">
Compare to ${ }
interpolation it keeps CSS syntax. CSS highlight and autocomplete works.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:12
- Comments:30 (11 by maintainers)
Top Results From Across the Web
Modifier (Java Platform SE 7 ) - Oracle Help Center
The Modifier class provides static methods and constants to decode class and member access modifiers. The sets of modifiers are represented as integers...
Read more >Java Modifiers - W3Schools
The public keyword is an access modifier, meaning that it is used to set the access level for classes, attributes, methods and constructors....
Read more >Modifier classes - Pivotal UI
A modifier is a tiny CSS class that has one job (e.g., it sets a single CSS property). They are sometimes called utility...
Read more >Access Modifiers in Java - GeeksforGeeks
As the name suggests access modifiers in Java help to restrict the scope of a class, constructor, variable, method, or data member.
Read more >Naming - BEM
Spaces in complicated modifiers are replaced by dash. Modifier is an extra class name which you add to a block/element DOM node. Add...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Currently, we use
stylis
as the parser (though planning to switch to postcss for few reasons) which handles scoped keyframes as well as:global
.We create separate CSS files for each JS file and add a require statement, which gets picked up by css loader. Code splitting works similar to when you import vanilla css files with
mini-css-extract-plugin
.data-
attributes will be DOMdata-
attributes were created for a different purpose. People will not love them, as result it will not be syntax sugar feature for linaria as it works forastroturf
.