question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unused css highlighting is always messed up

See original GitHub issue

Describe the bug When using SCSS style blocks, the unused CSS wiggly yellow lines don’t show up in the right place.

image

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

  1. Make a simple component with some elements
  2. Add some used and unused vanilla CSS without SCSS functions or syntax sugar
  3. 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:closed
  • Created 3 years ago
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
dummdidummcommented, Nov 21, 2020

This should be fixed with version 4.6.1 of svelte-preprocess.

2reactions
benmccanncommented, Sep 14, 2020

It’s high on our radar. It’s not in a mergable state yet though. I left some comments on it.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found