Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed: Avoid CSS @import #10

Open
delisma opened this issue May 1, 2021 · 0 comments
Open

Speed: Avoid CSS @import #10

delisma opened this issue May 1, 2021 · 0 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed

Comments

@delisma
Copy link
Contributor

delisma commented May 1, 2021

Describe the bug
Avoid using @import in CSS files as this prevents parallel loading of CSS. Inside a CSS file, @import can be used to include the contents of another CSS file by specifying a URL. This can be convenient but impacts download times because browsers can only start fetching the imported URL after the CSS file containing the @import has been fetched.

To Reproduce
theme.min.css
wet-boew.github.io/themes-dist/GCWeb/GCWeb/css/theme.min.css (2 CSS imports)

Expected behavior
To get a page to load CSS files in parallel, we should instead add a <link rel="stylesheet" href="..."> tag for each of the CSS files we need to load to the HTML code of the page.

@delisma delisma added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed labels May 1, 2021
@delisma delisma self-assigned this May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant