Harry Roberts - Managing CSS Projects with ITCSS

62K views · 11 years ago · talk · intermediate · dated

Harry Roberts presents ITCSS, a way of organizing CSS into ordered layers from low-specificity to high-specificity code. He explains the problems of large CSS codebases and how the layered structure keeps them manageable.

HN treats it as the standard explanation of the pain points ITCSS solves and as the answer to questions about front-end structure and design patterns.

“Harry Robert's video does a great job of describing all the pain points ITCSS solves”

3 comments from Hacker News

a
@alwillis2022 · in “CSS's !important was added because of laws about font size for some text”
I've come to the conclusion that writing CSS is an anti pattern I don't think this is true. The biggest problem is people who write CSS do it as if they want CSS to be something else and are trying to force it to be that. Writing CSS using ITCSS (Inverted Triangle CSS) [1] solves so many of the issues devs complain about it. It's simple: create layers in specificity order. Don't fight the cascade; make it work for you. Writing good CSS isn't about getting the syntax right; it's about getting the architecture right [2]. Harry Robert's video does a great job of describing all the pain points ITCSS solves [3]. [1]: link [2]: link [3]: ▶ this video
RecommendsView on HN
j
@jkinz862015 · in “Ask HN: Front-end “design patterns”?”
I think what you're looking for is Harry Roberts' ITCSS? www.youtube.com/watch?v=1OKZOV-iLj4
RecommendsView on HN
o
@olav2016 · in “Thoughts on Atom Building in the Pattern Library”
Two thoughts: (1) Much of the complexity of the OP's example is due to the fact that the template language they use, Twig, does not abstract HTML. If they would use a higher level templating language, e.g. Jade (link) much of the need to have such things as his proton pattern, would not even arise. Another attempt at a living styleguide generator, link does just that. (2) The very necessity to discuss atom vs. molecule makes me think that maybe the distinction is not such a good idea after all. Harry Roberts in his ITCSS has just "components" ▶ this video . The other layer that Harry has, "objects", is subsumed under "atoms". This leads to another round of fruitless discussions.
CitesView on HN