-
Notifications
You must be signed in to change notification settings - Fork 42
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
Transform for async loading css #146
Comments
That's a great idea. They recently released criticalCSS, which you could use. For this a config file discussed in #74 would be really useful, because I don't think automatically extracting critical CSS is ever precise enough, so passing options via a config file could be much more readable. |
But what would those options do? I am more inclined to just say that people must curate their own manifest if a full automation is not acheiveable. Something like this could be an option: <link rel="stylesheet" href="header.css" ag-critical>
<link rel="stylesheet" href="menu.css" ag-critical>
<link rel="stylesheet" href="content.css">
<link rel="stylesheet" href="footer.css"> |
It would probably be nicer to make this a general thing though. Like adding |
These options, for example. |
If people would stop using sass in the wrong way where they If they properly split up their stylesheets, like they should, it will work |
Yeah, I've written a post about that, but I changed my mind since then. I'd rather not import globals in each new stylesheet. But I never considered it a bad practice, interesting. |
You're right, with Web Components the issue is immediately obvious. I guess it's alright to enforce it, since people should be using Web Components anyways. |
There is a lot of talk about getting CSS, and especially CSS loaded fonts off the critical rendering path.
This script does this well: https://github.com/filamentgroup/loadCSS
We might want to provide a transform behind an option to do this
The text was updated successfully, but these errors were encountered: