Styles are getting duplicated on file change
See original GitHub issueHere’s an example https://stackblitz.com/edit/angular-v7k3u9
Change a file (any file, even a component typescript file) and notice that a new <style>
tag is inserted every time.
Another issue that might be related is that if you make an error in the styles.scss
file like for example misspelling !important
like !importan
it will forever error, even if you fix it. You must reload the entire page to resolve this issue. It’s remembering when it was wrong and still trying to compile it. This also happens when editing a component’s scss, not just the main styles.scss
. Changing the reload mechanism to “save” doesn’t even help. The errors show up on edit so I have to reload all the time, it’s quite unbearable.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Styles duplicated across css chunks create source order ...
When I build the project that component's styles are duplicated in each of the relevant css page chunks; this creates visual bugs.
Read more >styles that are used are duplicated (eg. pink becomes pink2)
When I copy cells from one xlsx file to another, the styles are duplicated. - So, there used to be "pink" style, but...
Read more >Duplicate Graphic Styles when copying form one dokument ...
When I copy objects that are linked to graphic style from one document and paste them into a document with the identical graphic...
Read more >Duplicated styles on head and a lot of <style> elements
The behavior you're seeing is caused by ViewEncapsulation.Emulated defined for material components. First, you don't need to add styles for ...
Read more >Why are Angular Material styles duplicated in my project?
Instructions for troubleshooting duplication of styles caused by theming configuration.
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
@tylde Sorry for the delay, I just pushed a fix for this so styles in React should be unloading properly now 😃 Lmk if you’re still running into problems with this
It works fine now, thanks. 😃