TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Does CSS performance is a thing?

3 pointsby boraalparatalmost 5 years ago
How do we calculate it? Using a framework like twitter-bootstrap is too slow or starting from zero worth the hustle.

1 comment

phillipseamorealmost 5 years ago
CSS performance is a thing, both the transfer of the CSS and the actual performance of it.<p>Transferring unused CSS is a common problem, and adds weight to the page or more resources to download before rendering (rendering is blocked until all CSS has been retrieved and parsed).<p>CSS selectors have different performance, though it&#x27;s negligible on most users devices today. One common misunderstanding is the way CSS selector are processed. They are processed from right to left, so a &quot;#mystuff div&quot; will actually lookup all div&#x27;s in the page and check if it&#x27;s a child of #mystuff.<p>I never use any frameworks, they are not worth the hassle. Just start from zero (expecting you actually know enough CSS). Typically, when I write CSS from the ground up, it&#x27;s just a few kilobytes without any unnecessary code. Using more targeted CSS (I try and keep everything referring to ID&#x27;s or specific classes) you will also end up with less HTML (no &quot;button button-big button-blue button-shadow&quot; classes all over the place).