• Resolved Nabil Sikder

    (@mdnabilsikder)


    Hello Team,

    Is it possible to inline all css on it’s own position/order with id instead of making all in one style tag? I have feeling that in some cases it’s missing the order/priority. Let me know if there is any hook/filter. If not, I would like to request this feature.

    Thanks
    Nabil

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    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

    Thread Starter Nabil Sikder

    (@mdnabilsikder)

    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

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Well, try changing (removing?) the CSS optimization exclusions, that might help keeping the order intact?

    Thread Starter Nabil Sikder

    (@mdnabilsikder)

    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.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    In that case tick also aggregate inline CSS and add exclusions to exclude specific inline CSS?

    Thread Starter Nabil Sikder

    (@mdnabilsikder)

    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.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    URL, attribute OR a string that is part of the inline CSS you want to exclude 🙂

    Thread Starter Nabil Sikder

    (@mdnabilsikder)

    It works. Thank You.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    you’re welcome Nabil, feel free to leave a review of the plugin and support here! 🙂

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Place Inline CSS separately on exact order’ is closed to new replies.