@jdaudier via Gitter:
We use critical and it simply takes some declaration that it thinks are critical for rendering path out of current CSS, moves to the top of the page. The other CSS is loaded asynchronously via JavaScript.
It means that order of CSS declaration can change - as some declaration can be taken out of source CSS and moved to critical path, while the all code that creates it is still in original CSS.
That's results in sometimes unfortunate CSS being applied when declaration is out-of-the-context, in different order than intended, etc:
Why this button should have a top margin?
The lesson is to not position elements directly and position/layout their containers. This should fix that issue (if not, we will try to use helper classes as I wrote some time ago).
@jdaudier via Gitter: We use
critical
and it simply takes some declaration that it thinks arecritical
for rendering path out of current CSS, moves to the top of the page. The other CSS is loaded asynchronously via JavaScript. It means that order of CSS declaration can change - as some declaration can be taken out of source CSS and moved tocritical
path, while the all code that creates it is still in original CSS. That's results in sometimes unfortunate CSS being applied when declaration isout-of-the-context
, in different order than intended, etc:Why this button should have a top margin? The lesson is to not position elements directly and position/layout their containers. This should fix that issue (if not, we will try to use helper classes as I wrote some time ago).