[Resolved] Using Hook Elements for Critical CSS

Home Forums Support Using Hook Elements for Critical CSS

  • This topic has 4 replies, 2 voices, and was last updated 2 months ago by David.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1382909
    Anthony

    I want to know if this is a good idea before I get too crazy with it.

    Currently, I have some pages that just perform a lot better when certain styles are loaded in the <head>.

    But, in an effort to keep every page having only the code it requires I began using hook elements and their display rules to conditionally place CSS in the <head> sections of specific pages.

    Is this a good idea for the long run?

    I know I read somewhere on the forum that you guys were working on making it ok to have a plethora of hooks/elements (not that I have many. I only have about 10 and 3 of them are <head> CSS).

    Thoughts on this?

    Thanks again!

    -Anthony

    #1382925
    David
    Staff
    Customer Support

    Hi there,

    yes, hook elements are great for adding inline CSS to the Head. Can’t see any issues as long as you don’t intend to add LOTS of them which could be a maintenance headache.

    #1382952
    Anthony

    Great news.

    Thanks, David!

    Best

    #1382962
    David
    Staff
    Customer Support
    #1382963
    David
    Staff
    Customer Support
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.