There are 2 things that impact order:
1. the (default) exclusions (which you can change)
2. CSS is combined per media-type (e.g. media="all", media="screen", media="print")
But inlining CSS in position is not supported no and given the downsides of inlining all CSS (aggregated or not) I strongly advice against it. If your goal is to ‘remove render-blocking CSS’ then I would suggest to use that option, providing “above the fold CSS” or using the critical CSS integration?
hope this clarifies,
frank
I understand the concept behind it. but i need it, because will do delay for not used css so doing inline on position will not hurt much.
I just want to get rid myself from depending on external server things like critical css/used css
Well, try changing (removing?) the CSS optimization exclusions, that might help keeping the order intact?
Yes, but actually if i untick Also aggregate inline CSS that breaks the order. In some cases we cannot include inline css to all because in some plugins/themes, it’s need to be excluded/seperate due to dynamic css/inject css through JS, I hope you well known with such cases.
In that case tick also aggregate inline CSS and add exclusions to exclude specific inline CSS?
Wow, that would be interesting.
How to achieve that? isn’t it currently based on url or attribute?
-
This reply was modified 4 years, 6 months ago by
Nabil Sikder.
URL, attribute OR a string that is part of the inline CSS you want to exclude 🙂