Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Reset in Critical CSS

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #244843
    ztgst
    Participant

    Hi everyone, my question is : someone add their css reset as part of the critical css, referring to the css that should be inline in the html and non produces a block in the render.

    Thanks in advance…

    #244845

    Not sure exactly what you are asking. However, I put all of my css resets in my main style sheet. I do not use inline styling. It would only appear when a contributor to the site adds inline HTML with styling.

    #244850
    Atelierbram
    Participant
    #244869
    ztgst
    Participant

    Not yet, actually I’m evaluating options about it, I testing whit this script (https://gist.github.com/scottjehl/b6129da04733e4e0f9a4), per example for me maybe the styles for layout are more important than the result, so for that is my question, if the reset css should be part of the critical CSS, I don’t know if I explain well

    #244872
    Atelierbram
    Participant

    I Actually linked to the wrong repo, it’s this one for grunt-criticalcss.
    Thinking about adding custom styles to this, maybe have a custom criticalcss-custom.css as well, for the things you want in there, but are omitted by criticalcss. No harm in keeping those separated I suppose.

    “`html
    <style><?php include(‘/path/to//criticalcss.css’);?></style>
    <style><?php include(‘/path/to//criticalcss-custom.css”);?></style>
    </code></pre>

    You shouldn’t need a reset in there, to keep it lightweight *{margin:0;padding:0} will do. But you just will have to try this out for yourself, and see what kind of CSS the plugin actually generates.

    #244874
    ztgst
    Participant

    Yeah! thanks @Atelierbram, maybe I should testing more and deal this on diferent way, because the criticalCSS is all styles you need for paint on the first render, but What happen if you need repaint when you load your .css file?.
    I will share my results after, maybe this can help someone.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.