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.

10K+ lines of redundant CSS delivered on every project page

See original GitHub issue

Steps to Reproduce

  1. Open a project page
  2. Inspect page, view inner html of <head>
  3. Observe over 15,000 lines of code in <style> tags, most of it redundant copies of itself

This behavior is consistent on a project with many comments and a project with very few comments.

Operating System and Browser

Firefox 78.6.0esr on Debian 10

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
mxmoucommented, Apr 29, 2021

It looks to me that they aren’t copies, each has similar comments, but different css.

Most stylesheets @import _colors.scss and _frameless.scss, so they’re actually copies.

1reaction
GrahamSH-LLKcommented, May 13, 2021

What if we remove all comments and css from the imported files? We wouldn’t have any duplicated css, because variables shouldn’t output to actual css.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Brainstorming]: Optimization - Get rid of unused css. #36798
Generates CSS for every page is bad idea - you not thinked how browser's cache it. Look to UnCSS and Critical.
Read more >
How Do You Remove Unused CSS From a Site?
To clean CSS with multiple pages just use that tool for all pages with different layouts. Then merge all exported CSS files to...
Read more >
How To Optimize CSS for Peak Site Performance - Kinsta
Click any file to view its source with the unused code highlighted in red in the line number gutter. A few things to...
Read more >
How to Remove Unused CSS for Leaner CSS Files - KeyCDN
Over time, CSS files become bloated with unused CSS. Learn how to remove unused CSS for smaller file sizes and better performance overall....
Read more >
A project with a single 11000-line code file - Hacker News
Global variables everywhere, short names, and not even indentation. All the account data was stored in flat files, there was no actual DB....
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