Polymer mixin syntax is incompatible with Sass
See original GitHub issueFrom https://github.com/Polymer/polymer/issues/1373:
Running the following through the Sass compiler:
:host {
--my-toolbar-theme: {
background-color: green;
border-radius: 4px;
border: 1px solid gray;
}
}
Results in:
:host {
--my-toolbar-theme-background-color: green;
--my-toolbar-theme-border-radius: 4px;
--my-toolbar-theme-border: 1px solid gray;
}
Which is obviously unwanted.
Reference: https://www.polymer-project.org/1.0/docs/devguide/styling.html#custom-css-mixins
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Sass mixin that references parent styles - Stack Overflow
We can reference parent selectors using the ampersand & but do we have a solution for referencing parent styles? I'd like to be...
Read more >mixin and @include - Sass
Overview; Passing Arguments to Content Blocks. Indented Mixin Syntax. Mixins allow you to define styles that can be re-used throughout your stylesheet.
Read more >Use custom properties - Polymer Project
Using CSS mixins, an element author can define a set of CSS properties as a single custom property and then allow all properties...
Read more >Mixins for Rem Font Sizing - CSS-Tricks
For those using Sass, I wrote a mixin to handle rem conversions a ... box should be 4 times a variable baseline (16),...
Read more >Sass with Polymer in production - Toaster
Sass is an integral component to our workflow here at Toaster. We utilise Sass to ... Therefore we have come up with a...
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
–my-toolbar-theme is not a valid selector, so it’s not handled as such, you need to escape it in scss to get what you want:
see also
@voondo Feel free to ping the Polymer Slack community about this.