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.

global reset styles disappear in dev mode

See original GitHub issue

how to reproduce

  • check out this repo
  • npm i
  • npm run build
  • cd example/svelte
  • npm i
  • npm run dev

Add this markup to the src/App.svelte file:

<script>
  import Feature from './components/Feature.svelte'
</script>
<h1 class="bg-gray-100">a</h1>
<main>
...

and hit save. It renders correctly. Now add one character and hit save:

<script>
  import Feature from './components/Feature.svelte'
</script>
<h1 class="bg-gray-100">ab</h1>
<main>
...

Again it renders correctly. Now remove the last character and hit save:

<script>
  import Feature from './components/Feature.svelte'
</script>
<h1 class="bg-gray-100">a</h1>
<main>
...

Now the global reset styles are gone (not added to bundle.css). This happens to all markup that I already entered. As soon as I enter markup the first time, the global styles are added again. The second time with the same markup -> styles are gone.

Hope it’s detailed enough to reproduce.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
alexanderniebuhrcommented, Feb 24, 2021

I thought that. Rollup is making some weird stuff for us. I have a look into it. Production builds shouldn’t be a problem though. Might need some time for this. soz

0reactions
alexanderniebuhrcommented, Mar 2, 2021

@munxar i will check tomorrow. I still thing it might be an setup issue…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Chrome Dev Tools inspect element styles not showing
I just close the tab, and reopen it, and then right click > inspect element. Don't need to restore the whole dev tools...
Read more >
Global styles or scripts · Issue #3127 · sveltejs/kit - GitHub
Today I'm having the same problem to apply a .scss file globally to reset the css. It would be very important to have...
Read more >
How can I reset a Style in Microsoft Word? - Super User
Found this method: Design tab > press gallery down arrow and click 'Reset to Default Style Set...'.
Read more >
revert - CSS: Cascading Style Sheets - MDN Web Docs
The revert CSS keyword reverts the cascaded value of the property from its ... Thus, it resets the property to its inherited value...
Read more >
Customize DevTools - Microsoft Edge Development
Restore default settings ... To restore the default theme, placement, tools order, and any other customized settings, select Settings > ...
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