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.

An unexpected error caused by a CSS class

See original GitHub issue

Describe the bug

Good morning, I am getting very rare error with one-block css.

It turns out that when I go to my “projects” web section, it slows down and takes a long time to load the page. Once loaded the project cards also take time to show the animations when making a hover.

The console does not throw errors but I identified what it is. It’s because of using a display: grid in my css classes.

Why could this be happening?

Reproduction

https://user-images.githubusercontent.com/3437192/142632666-985bddc3-aab4-4094-a8d6-b6ba393e6f51.mp4

Logs

The editor and browser console does not throw me an error

System Info

System:
    OS: Windows 10 10.0.19042
    CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
    Memory: 8.81 GB / 15.94 GB
  Binaries:
    Node: 14.17.0 - C:\Program Files\nodejs\node.EXE
    npm: 6.14.13 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 96.0.4664.45
    Edge: Spartan (44.19041.1266.0), Chromium (95.0.1020.53)
  npmPackages:
    @sveltejs/kit: next => 1.0.0-next.184
    svelte: ^3.44.2 => 3.44.2

Severity

annoyance

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
JappICcommented, Nov 19, 2021

I also tried vanilla css in case the problem came from postcss but the error keeps reproducing

0reactions
JappICcommented, Nov 20, 2021

The fact that a CSS change makes the bug go away means that this is almost certainly not a Svelte-Kit bug. Svelte (and Svelte-Kit) do not have anything to do with the browser’s rendering of CSS. Svelte compiles your components to Javascript, and Svelte-Kit helps serve your pages and endpoint routes, but neither one does anything with your CSS besides add a unique svelte-123456 class to your elements.

Which means that this issue tracker is not the right place for this. The Svelte community at https://svelte.dev/chat is very friendly and you’ll find people willing to help you there. (Though this weekend a lot of people will be busy preparing for Svelte Summit, so you might not get help until Monday). And if it turns out that this really is a Svelte-Kit bug after all, please feel free to open a new issue — but this time, please follow the instructions on the new issue page:

A link to a repository that reproduces the issue. Explaining how to reproduce is generally not enough. It pushes the burden of creating a reproduction project onto a small set of volunteer maintainers and isn’t scalable. If no reproduction is provided within a reasonable time-frame, the issue will be closed.

A video showing the issue happening is fine, but that’s not something that others can clone, reproduce, and watch the bug happening on their own machines. We need an actual Git repository link. If your repository is private, you can create a small repo that reproduces the bug. But either way, if you do end up proving that this is a Svelte-Kit bug after all and open a new issue, please make sure to include a link to a reproduction repo so that others can clone it and watch the bug happen. Otherwise, there’s almost no chance anyone will be able to figure out what’s causing it and fix the issue.

Ok I understand, thank you very much for the clarification

Read more comments on GitHub >

github_iconTop Results From Across the Web

I am getting CSS SyntaxError, unexpected token {. But I can ...
I am getting CSS SyntaxError, unexpected token {. But I can not see error · 5. Your CSS file is being processed as...
Read more >
Unexpected error - CSS HTML Validator Support
The Validator helpfully inform me that it is a CSS4 pseudo-class, and warns that some browsers may not support it. Fine and good....
Read more >
CS4 - An unexpected error occurred while trying to... - 9512424
Lately in DW4 my CSS file has intermittently been giving me the following error when I try save or open .classes from the...
Read more >
Understanding why your CSS fails - LogRocket Blog
It can be tricky to find out why your CSS isn't working as expected. Learn ways of finding and preventing weird behavior in...
Read more >
500 Internal Server Error - HTTP - MDN Web Docs - Mozilla
... (HTTP) 500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented ...
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