[v1 branch] css tag template literal returns a single classname?
See original GitHub issueI’m testing the v1 beta, and have noticed some styles failing to apply after switching from 0.x… the mapping of the computed module seems to be selecting an inner property…
const styles = _Icon_styles_module_css__WEBPACK_IMPORTED_MODULE_4___default.a.cls2;
this was computed from:
const styles = css`
.input-icon {
position: relative;
display: inline-block;
--icon-size: 34px;
}
.input-icon.placeholder-label {
display: block;
}
...
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Stack your classes within template literals | by Chris Nager
Within my React components, I stack my CSS classes in a template literal. This gives me the added benefit of clearly defining my...
Read more >Template Literals | CSS-Tricks
The Template Literal, introduced in ES6, is a new way to create a string. With it comes new features that allow us more...
Read more >className error with tagged template literals #3259 - GitHub
Yes, I'm using NextJs. I should also mention this only happens if you are using a variable, it's working fine everywhere else.
Read more >How to use template literals in tailwindcss to change classes ...
As long as a class name appears in your template in its entirety, Tailwind will not remove it from production build.
Read more >Template literals (Template strings) - JavaScript | MDN
Template literals are literals delimited with backtick (`) characters, allowing for multi-line strings, string interpolation with embedded ...
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
yes in v1
css
returns a single class, and you don’t include the class name in the declaration:the
stylesheet
tag was added to take the place for whatcss
used to do. The readme has not been updated yet, but there is an actual docs site https://astroturf.netlify.app/migration/ don’t be too worried, there are automated code-mods that should make the process of migrating completely automated@jsg2021
We can use it: