10K+ lines of redundant CSS delivered on every project page
See original GitHub issueSteps to Reproduce
- Open a project page
- Inspect page, view inner html of
<head>
- 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:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top 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 >
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 Free
Top 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
Most stylesheets
@import
_colors.scss
and_frameless.scss
, so they’re actually copies.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.