8 simple rules for a robust, scalable CSS architecture

Related: This is the manifest of things I’ve learned about managing CSS in large, complex web projects during my many years of professional web development. I’ve been asked about these things enough times that having a document to point to sounded like a good idea. I’ve tried to keep the explanations short, but this is essentially the tl;dr: Always prefer classes Co-locate component code Use consistent class namespacing Maintain a strict mapping between namespaces and filenames Prevent leaking styles outside the component Prevent leaking styles inside the component Respect component boundaries Integrate external styles loosely » Jarno Rantanen | github.com | via css-tricks.com

November 1, 2016 · 1 min · 103 palabras · Nacho Cano