You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For a very large project with over 2k pages and 30+ layouts, we use critical and that uses your library under the hood. Basically, it is possible to define uris and the template path. Critical css gets generated from the uri and the template path is just for including it into the right template.
The problem is that layout 1, for example, is used for 500 pages. If layout 1 looks different for 100 pages due to e.g. a different hero variant, the critical css will be generated correctly for either 100 or 400 pages. Because I can't use two urls with different heros for one style sheet.
Solution
It would be cool if something like this would be possible:
There are some difficulties when generating critical css for multiple pages.
See #111
Even without the asset inlining problem described in #111, i don't see a robust way of generating critical css working for multiple pages which might also have conflicting styles. This might not be a problem for pages using a design system and with different components used on the page but we can't take it as granted.
Imagine there are two pages with a hero component using different styles coming from different stylesheets for example. Very unlikely in modern web development but definitely possible. One of those pages might break when the critical styles are merged into one.
For a very large project with over 2k pages and 30+ layouts, we use critical and that uses your library under the hood. Basically, it is possible to define uris and the template path. Critical css gets generated from the uri and the template path is just for including it into the right template.
Such a config looks like that:
Problem
The problem is that layout 1, for example, is used for 500 pages. If layout 1 looks different for 100 pages due to e.g. a different hero variant, the critical css will be generated correctly for either 100 or 400 pages. Because I can't use two urls with different heros for one style sheet.
Solution
It would be cool if something like this would be possible:
And the CSS classes could then be merged into a single stylesheet.
If you need more information feel free to ask :)
The text was updated successfully, but these errors were encountered: