Hacker News new | past | comments | ask | show | jobs | submit login

The recommendations are to inline the important (render-blocking) CSS, so at most only the part of the CSS that applies to the 1K of HTML should be inlined.



The recommendation you describe is a violation of the AMP standard, which strictly disallows this for performance reasons.


Sorry, I was commenting generally. Don’t know about AMP. How does that make sense, though? What performance reasons could there possibly be for inlining CSS that doesn’t apply to any element in a page?


Likewise, I'm sorry, I didn't mean "you have to inline CSS that doesn't apply".

However, if you have non-render blocking CSS, or CSS that's used for below the fold or generally lower down the page content, "only render critical CSS inline" is usually coupled with "and then have the rest of your CSS in an external stylesheet". Which you are not allowed to do.

Accordingly, it's ALL inline, all the time.


When surver push of resources gets better supported by browsers, I bet AMP will be updated to change this restriction.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: