unused css highlighting is always messed up
See original GitHub issueDescribe the bug When using SCSS style blocks, the unused CSS wiggly yellow lines don’t show up in the right place.
It should highlight the .introduction
class, but it highlights the height
property (or any last property of the first defined style) instead.
When switching back to a normal CSS block without the lang
attribute, it works fine.
To Reproduce
- Make a simple component with some elements
- Add some used and unused vanilla CSS without SCSS functions or syntax sugar
- Change the
<style>
to<style lang="scss">
Expected behavior
Work the same as when it is just a normal <style>
block
Screenshots See above
System (please complete the following information):
- OS: Windows
- IDE: VScode
- Plugin/Package: “Svelte for VSCode”
Additional context No additional plugins or extensions were enabled when making the screenshot. I even restarted vscode just in case.
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (9 by maintainers)
Top Results From Across the Web
Handling Unused CSS In Sass To Improve Performance
In this article, we'll explore a Sass-oriented solution for dealing with unused CSS, avoiding the need for complicated Node.js dependencies ...
Read more >"We had 90% unused CSS because everybody was afraid to ...
One folder for every component with its template, css file and controller / backend code. The template is always wrapped in a single...
Read more >Troubleshoot Remove Unused CSS issues - WP Rocket
First steps. It's important that your make sure Remove Unused CSS is causing the problem on your site's layout. For this purpose, the...
Read more >Defer unused CSS - Stack Overflow
I'm stuck on 'defer unused CSS' point that's being highlighted by Google PageSpeed insights (lighthouse) and/or Chrome's Performance Audit.
Read more >Optimizations in Syntax Highlighting, a Visual Studio Code Story
Tokens <-> Theme matching. We thought it would be a good idea to follow browser best practices, such as leaving the styling up...
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
This should be fixed with version
4.6.1
ofsvelte-preprocess
.It’s high on our radar. It’s not in a mergable state yet though. I left some comments on it.