Docs / CSS / Force Include Styles in Critical & Used CSS

Force Include Styles in Critical & Used CSS

FlyingPress tries its best to render pages in a Chrome browser to detect Critical and Used CSS.

In case some CSS is not included in your Critical and Used CSS, you can tell FlyingPress to forcefully include them. All you have to do is specify the CSS selector.

For example, let's say we have a Cookie notice which somehow didn't get added in Critical CSS.

The HTML and CSS will look like this:

<div id="cookie-notice">
  <p class="heading">Cookies!</p>
  <p class="content">Cookies are very delicious.</p>
</div>
#cookie-notice {
  background: grey;
}
#cookie-notice .heading,
#cookie-notice .content {
  color: white;
}

In order to forcefully include the CSS required for this, add "#cookie-notice" or "cookie-notice" to the CSS -> Force Include Selectors.