{"id":2441,"date":"2016-03-28T13:51:01","date_gmt":"2016-03-28T13:51:01","guid":{"rendered":"http:\/\/www.ckl.io\/?p=2441"},"modified":"2022-07-01T17:59:40","modified_gmt":"2022-07-01T17:59:40","slug":"css-architecture-first-steps","status":"publish","type":"post","link":"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/","title":{"rendered":"CSS Architecture: First steps"},"content":{"rendered":"<p>CSS was designed to be a very simple and intuitive language. Its basic purpose is to define selectors to target HTML elements and apply attributes to them. Easy to grasp and start applying. When working on large and complex projects, though, some CSS features might be a little trickier to deal with.<\/p>\n<p>Its <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/Cascade\" target=\"_blank\" rel=\"noopener\">cascading<\/a> feature, for example, allows properties to be overridden by other selectors according to its order on the sheet or by <a href=\"https:\/\/developer.mozilla.org\/en\/docs\/Web\/CSS\/Specificity\" target=\"_blank\" rel=\"noopener\">selector specificity<\/a>. Also, elements <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/CSS\/inheritance\" target=\"_blank\" rel=\"noopener\">inherit<\/a> properties from their parents on the DOM. Without proper organization, this can quickly get out of hand and messy. That&#8217;s where an architecture comes to help.<\/p>\n<p><!--more--><\/p>\n<h2>What is a CSS Architecture?<\/h2>\n<p>A CSS architecture brings reasoning to CSS authoring. Imagine it as a set of guidelines and best practices to help developers write&nbsp;code that&#8217;s <strong>maintainable<\/strong>, <strong>flexible to scale<\/strong> and <strong>more reusable<\/strong>. We achieve that by <strong>applying a modular approach<\/strong>, <strong>promoting organization<\/strong> and <strong>conveying meaning<\/strong> to our codebase. We\u2019ll see how to apply these principles with 3 basic steps.<\/p>\n<p><strong>Modularity<\/strong> is a core concept. Not only on a code level, but also on a design one. Digital products have evolved a lot in the past years, due to the rise of new devices and the responsive web. Complexity has changed. We, as developers and designers, have to support this new scenario. Designing pages is no longer the best approach; we should build <a href=\"http:\/\/bradfrost.com\/blog\/post\/atomic-web-design\/\" target=\"_blank\" rel=\"noopener\">design systems<\/a>. Page-based CSS won&#8217;t suit our needs on building flexible and scalable products. Working with reusable components is the way to go.<\/p>\n<p>On a CSS architecture, modularity can be applied on several levels. The three basic steps to start structuring your CSS that way are by:<\/p>\n<ol>\n<li>breaking the code into smaller chunks and separating them by scope;<\/li>\n<li>coding components in a independent and encapsulated manner;<\/li>\n<li>naming CSS selectors according to their purpose and relationship with each other.<\/li>\n<\/ol>\n<h2>Getting started<\/h2>\n<h3>1. Separate and categorize your code<\/h3>\n<p>To keep the architecture modular, it\u2019s important to break the code into smaller parts. Multiple files make the code easier to read, navigate and track. To do that, a CSS preprocessor \u2013 such as <a href=\"http:\/\/sass-lang.com\/\" target=\"_blank\" rel=\"noopener\">Sass<\/a>, <a href=\"http:\/\/lesscss.org\/\" target=\"_blank\" rel=\"noopener\">LESS<\/a> or <a href=\"http:\/\/stylus-lang.com\/\" target=\"_blank\" rel=\"noopener\">Stylus<\/a> \u2013 or a post-processor \u2013 such as <a href=\"http:\/\/postcss.org\/\" target=\"_blank\" rel=\"noopener\">PostCSS<\/a> \u2013 is the way to go. Preprocessors enhance the capabilities of CSS authoring, introducing new features such as variables, mixins and <a href=\"http:\/\/sass-lang.com\/guide\" target=\"_blank\" rel=\"noopener\">much more<\/a>. To work with separate files, your code will be divided into <a href=\"http:\/\/sass-lang.com\/guide#topic-4\" target=\"_blank\" rel=\"noopener\">partials<\/a> and <a href=\"http:\/\/sass-lang.com\/guide#topic-5\" target=\"_blank\" rel=\"noopener\">imported<\/a> on a <code class=\"language-css\">main.scss<\/code> file, that will compile everything into a single <code class=\"language-css\">.css<\/code> file.<\/p>\n<figure id=\"attachment_2442\" aria-describedby=\"caption-attachment-2442\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-2442 size-full\" src=\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/main-scss-e1459171515970.png\" alt=\"main-scss\" width=\"500\" height=\"618\"><figcaption id=\"caption-attachment-2442\" class=\"wp-caption-text\">Example of a <code class=\"language-markup\">main.scss<\/code> file. (Spoiler alert: it&#8217;s already categorized :P)<\/figcaption><\/figure>\n<p>Now it&#8217;s time to categorize each code block according to its scope on the project. One of the first methodologies out there to introduce selector categorization was <a href=\"http:\/\/www.smacss.com\" target=\"_blank\" rel=\"noopener\">SMACSS<\/a>. The layers proposed by SMACSS are <strong>Base<\/strong>, <strong>Layout<\/strong>, <strong>Module<\/strong>, <strong>State<\/strong> and <strong>Theme<\/strong>. <a href=\"https:\/\/speakerdeck.com\/dafed\/managing-css-projects-with-itcss\" target=\"_blank\" rel=\"noopener\">ITCSS<\/a> expanded this concept, introducing other layers, such as <strong>Settings<\/strong> and <strong>Trumps<\/strong>. MVCSS has a similar approach, but with different <a href=\"http:\/\/mvcss.io\/manifest\/\" target=\"_blank\" rel=\"noopener\">naming conventions<\/a>.<\/p>\n<figure id=\"attachment_2443\" aria-describedby=\"caption-attachment-2443\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-2443 size-full\" src=\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/itcss-layers-e1459171529481.png\" alt=\"ITCSS layer convention. https:\/\/speakerdeck.com\/dafed\/managing-css-projects-with-itcss?slide=49\" width=\"500\" height=\"306\"><figcaption id=\"caption-attachment-2443\" class=\"wp-caption-text\">ITCSS layer convention.<br \/> <a href=\"https:\/\/speakerdeck.com\/dafed\/managing-css-projects-with-itcss?slide=49\" target=\"_blank\" rel=\"noopener\">https:\/\/speakerdeck.com\/dafed\/managing-css-projects-with-itcss?slide=49<\/a><\/figcaption><\/figure>\n<p>You don&#8217;t need to follow these methodologies strictly. Learn the examples and figure what better fits your project. In my opinion, separating your architecture into <strong>Settings<\/strong>, <strong>Base<\/strong>, <strong>Layout<\/strong> and <strong>Components<\/strong> is a good start. <strong>Settings<\/strong> is where your configuration files, such as variables (colors, sizing, typography definitions&#8230;) and helpers (functions, mixins\u2026) will be stored. The <strong>Base<\/strong> layer will contain your <a href=\"https:\/\/necolas.github.io\/normalize.css\/\" target=\"_blank\" rel=\"noopener\">reset<\/a> and unclassed HTML rules \u2013 the way a default <code class=\"language-markup\">&lt;a&gt;<\/code> or <code class=\"language-markup\">&lt;input&gt;<\/code> should look like, for example. <strong>Layout<\/strong> stores the structural classes that hold components on the page \u2013 grids and containers, for example. And lastly, <strong>Components<\/strong>: the core of CSS architectures and design systems.<\/p>\n<h3>2. Define your Components<\/h3>\n<p>I consider components the core of a CSS architecture because that&#8217;s where most of the code will live. They are the reusable visual patterns that compose a user interface \u2013 buttons, accordions or modals, for example.<\/p>\n<figure id=\"attachment_2444\" aria-describedby=\"caption-attachment-2444\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-2444 size-full\" src=\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/button-component-e1459172905900.png\" alt=\"A button component.\" width=\"300\" height=\"85\"><figcaption id=\"caption-attachment-2444\" class=\"wp-caption-text\">A button component.<\/figcaption><\/figure>\n<p>Each component should be encapsulated on its own file. For consistency reasons, it&#8217;s a good practice to use the same name for the file and main selector.<\/p>\n<figure id=\"attachment_2463\" aria-describedby=\"caption-attachment-2463\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"size-full wp-image-2463\" src=\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/button-scss-file1-e1459172955637.png\" alt=\"A button.scss file.\" width=\"650\" height=\"229\"><figcaption id=\"caption-attachment-2463\" class=\"wp-caption-text\">A <code class=\"language-markup\">button.scss<\/code> file.<\/figcaption><\/figure>\n<p>Some components aren&#8217;t as straightforward as a button. Some are more complex, composed of inner elements. Take this blog post component, for example. It has a <strong>thumbnail<\/strong>, a <strong>title<\/strong>, an <strong>excerpt<\/strong> and a <strong>link<\/strong>.<\/p>\n<figure id=\"attachment_2446\" aria-describedby=\"caption-attachment-2446\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-2446 size-full\" src=\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/blog-post-e1459171559829.png\" alt=\"A blog post component\" width=\"500\" height=\"539\"><figcaption id=\"caption-attachment-2446\" class=\"wp-caption-text\">A blog post component<\/figcaption><\/figure>\n<p>Sometimes, when defining components, you&#8217;ll be asking yourself what should be a standalone component or part of a larger block. To answer that, search your product or website for repeating patterns. If it is used on different contexts, abstract it to a standalone component. On the blog post example, the <code class=\"language-css\">.link<\/code> element is a separate component, because it is also used on other parts of the website. The other elements are specific to the blog post. Let&#8217;s see how to handle this relationship with selector names.<\/p>\n<h3>3. Apply a naming convention<\/h3>\n<p>Remember: we want our architecture to <strong>convey meaning<\/strong> and <strong>promote organization<\/strong>. Using a class naming convention in our components will help us achieve that. A pattern such as <a href=\"http:\/\/getbem.com\/\" target=\"_blank\" rel=\"noopener\">BEM<\/a> (Block, Element, Modifier) will clarify the intention and relationship between a component (the Block) and its elements, as well as reinforce predictability when compared with other components. The idea behind BEM is to name things according to this structure:<\/p>\n<ul>\n<li><strong>Block<\/strong>: the component itself;<\/li>\n<li><strong>Elements<\/strong>: the inner parts of the components (descendents on the DOM);<\/li>\n<li><strong>Modifiers<\/strong>: variations of the block or element.<\/li>\n<\/ul>\n<p>Using the blog post example:<\/p>\n<p><strong>Block<\/strong><\/p>\n<pre><code class=\"language-css\">.blog-post { \u2026 }<\/code><\/pre>\n<p><em>The blog post itself.<\/em><\/p>\n<p><strong>Element<\/strong><\/p>\n<pre><code class=\"language-css\">.blog-post__excerpt { \u2026 }<\/code><\/pre>\n<p><em>The excerpt inside the blog post. To denote the relation between the Element and the Block, BEM uses two underscores.<\/em><\/p>\n<p><strong>Modifier<\/strong><\/p>\n<pre><code class=\"language-css\">.blog-post--small { \u2026 }<\/code><\/pre>\n<p><em>A variation of the blog post that would make it smaller. To denote the relation between the Modifiers and the Block, BEM uses two dashes.<\/em><\/p>\n<p>On a organizational level, this approach promotes <strong>consistency<\/strong> and <strong>predictability<\/strong> across the <strong>Component<\/strong> layer. On a technical level, it helps decreasing selector specificity, increasing selector efficiency and decoupling our CSS from DOM structure (thus, <strong>promoting reusability<\/strong>). Take this other example:<\/p>\n<p>&nbsp;<\/p>\n<pre><code class=\"language-css\">section.container div.grid div p { \u2026 }<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>On this scenario, the browser has to check for all the conditions to apply the selector:<\/p>\n<blockquote><p>Is there a <code class=\"language-markup\">&lt;p&gt;<\/code> inside a <code class=\"language-markup\">&lt;div&gt;<\/code> inside another <code class=\"language-markup\">&lt;div&gt;<\/code> with a class of <code class=\"language-css\">.grid<\/code> inside a <code class=\"language-markup\">&lt;section&gt;<\/code> with a class of <code class=\"language-css\">.container<\/code>? If so, style this.<\/p><\/blockquote>\n<p>Complex, right? And a developer that stumble upon that selector might ask himself:<\/p>\n<blockquote><p>What&#8217;s the purpose of this selector on a broader scope? How does it relate to other selectors?<\/p><\/blockquote>\n<p>The BEM class-based approach, on the other hand, is much more precise and meaningful. The browser has only to check for the <code class=\"language-css\">.blog-post__excerpt<\/code> class on the DOM, which is more performatic. It can be reused, since it isn&#8217;t tightly coupled with DOM structure. And the developer can assume that it is part of a <code class=\"language-css\">.blog-post<\/code> component.<\/p>\n<h2>Wrapping up<\/h2>\n<p>These tips are just a starting point, a basic foundation and first steps for structuring CSS projects. For further reading on the subject, I recommend visiting this <a href=\"https:\/\/github.com\/modular-ui\/modular-ui-directory\" target=\"_blank\" rel=\"noopener\">list<\/a> that I&#8217;ve compiled with some awesome thoughts and methodologies from great developers that inspired this article. There are lots of different approaches out there (<a href=\"https:\/\/github.com\/modular-ui\/modular-ui-directory\/blob\/master\/css-architecture.md#methodologies\" target=\"_blank\" rel=\"noopener\">lots, really<\/a>). Feel free to contribute to it with an issue or pull request!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CSS was designed to be a very simple and intuitive language. Its basic purpose is to define selectors to target HTML elements and apply attributes to them. Easy to grasp and start applying. When working on large and complex projects, though, some CSS features might be a little trickier to deal with. Its cascading feature, [&hellip;]<\/p>\n","protected":false},"author":65,"featured_media":2941,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[432],"tags":[303],"class_list":["post-2441","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-engineering","tag-tag-frontend"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>CSS Architecture: First steps, by Thiago Victorino<\/title>\n<meta name=\"description\" content=\"First steps to start applying a CSS Architecture to front-end projects.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CSS Architecture: First steps, by Thiago Victorino\" \/>\n<meta property=\"og:description\" content=\"First steps to start applying a CSS Architecture to front-end projects.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/\" \/>\n<meta property=\"og:site_name\" content=\"Cheesecake Labs\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/cheesecakelabs\" \/>\n<meta property=\"article:published_time\" content=\"2016-03-28T13:51:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-01T17:59:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/css-architecture.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2000\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Cheesecake Labs\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@cheesecakelabs\" \/>\n<meta name=\"twitter:site\" content=\"@cheesecakelabs\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/\"},\"author\":{\"name\":\"Thiago Victorino\"},\"headline\":\"CSS Architecture: First steps\",\"datePublished\":\"2016-03-28T13:51:01+00:00\",\"dateModified\":\"2022-07-01T17:59:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/\"},\"wordCount\":1219,\"commentCount\":3,\"image\":{\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/css-architecture.jpg\",\"keywords\":[\"Front-end\"],\"articleSection\":[\"Engineering\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/\",\"url\":\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/\",\"name\":\"CSS Architecture: First steps, by Thiago Victorino\",\"isPartOf\":{\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/css-architecture.jpg\",\"datePublished\":\"2016-03-28T13:51:01+00:00\",\"dateModified\":\"2022-07-01T17:59:40+00:00\",\"author\":{\"@type\":\"person\",\"name\":\"Thiago Victorino\"},\"description\":\"First steps to start applying a CSS Architecture to front-end projects.\",\"breadcrumb\":{\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#primaryimage\",\"url\":\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/css-architecture.jpg\",\"contentUrl\":\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/css-architecture.jpg\",\"width\":2000,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cheesecakelabs.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CSS Architecture: First steps\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/#website\",\"url\":\"https:\/\/cheesecakelabs.com\/blog\/\",\"name\":\"Cheesecake Labs\",\"description\":\"Nearshore outsourcing company for Web and Mobile design and engineering services, and staff augmentation for startups and enterprises..\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cheesecakelabs.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"name\":\"Thiago Victorino\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cheesecakelabs.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/11\/thiago1-300x300.jpg\",\"contentUrl\":\"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/11\/thiago1-300x300.jpg\",\"caption\":\"Thiago Victorino\"},\"description\":\"10 years of experience in Marketing and Sales in the Technology sector. My main purpose is help, support and structure efficient operations and also develop independent and multidisciplinary teams.\",\"url\":\"https:\/\/cheesecakelabs.com\/blog\/autor\/thiago\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CSS Architecture: First steps, by Thiago Victorino","description":"First steps to start applying a CSS Architecture to front-end projects.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/","og_locale":"en_US","og_type":"article","og_title":"CSS Architecture: First steps, by Thiago Victorino","og_description":"First steps to start applying a CSS Architecture to front-end projects.","og_url":"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/","og_site_name":"Cheesecake Labs","article_publisher":"https:\/\/www.facebook.com\/cheesecakelabs","article_published_time":"2016-03-28T13:51:01+00:00","article_modified_time":"2022-07-01T17:59:40+00:00","og_image":[{"width":2000,"height":720,"url":"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/css-architecture.jpg","type":"image\/jpeg"}],"author":"Cheesecake Labs","twitter_card":"summary_large_image","twitter_creator":"@cheesecakelabs","twitter_site":"@cheesecakelabs","twitter_misc":{"Written by":null,"Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#article","isPartOf":{"@id":"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/"},"author":{"name":"Thiago Victorino"},"headline":"CSS Architecture: First steps","datePublished":"2016-03-28T13:51:01+00:00","dateModified":"2022-07-01T17:59:40+00:00","mainEntityOfPage":{"@id":"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/"},"wordCount":1219,"commentCount":3,"image":{"@id":"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#primaryimage"},"thumbnailUrl":"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/css-architecture.jpg","keywords":["Front-end"],"articleSection":["Engineering"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/","url":"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/","name":"CSS Architecture: First steps, by Thiago Victorino","isPartOf":{"@id":"https:\/\/cheesecakelabs.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#primaryimage"},"image":{"@id":"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#primaryimage"},"thumbnailUrl":"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/css-architecture.jpg","datePublished":"2016-03-28T13:51:01+00:00","dateModified":"2022-07-01T17:59:40+00:00","author":{"@type":"person","name":"Thiago Victorino"},"description":"First steps to start applying a CSS Architecture to front-end projects.","breadcrumb":{"@id":"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#primaryimage","url":"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/css-architecture.jpg","contentUrl":"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/03\/css-architecture.jpg","width":2000,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/cheesecakelabs.com\/blog\/css-architecture-first-steps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cheesecakelabs.com\/blog\/"},{"@type":"ListItem","position":2,"name":"CSS Architecture: First steps"}]},{"@type":"WebSite","@id":"https:\/\/cheesecakelabs.com\/blog\/#website","url":"https:\/\/cheesecakelabs.com\/blog\/","name":"Cheesecake Labs","description":"Nearshore outsourcing company for Web and Mobile design and engineering services, and staff augmentation for startups and enterprises..","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cheesecakelabs.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","name":"Thiago Victorino","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cheesecakelabs.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/11\/thiago1-300x300.jpg","contentUrl":"https:\/\/ckl-website-static.s3.amazonaws.com\/wp-content\/uploads\/2016\/11\/thiago1-300x300.jpg","caption":"Thiago Victorino"},"description":"10 years of experience in Marketing and Sales in the Technology sector. My main purpose is help, support and structure efficient operations and also develop independent and multidisciplinary teams.","url":"https:\/\/cheesecakelabs.com\/blog\/autor\/thiago\/"}]}},"_links":{"self":[{"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/posts\/2441","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/users\/65"}],"replies":[{"embeddable":true,"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/comments?post=2441"}],"version-history":[{"count":1,"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/posts\/2441\/revisions"}],"predecessor-version":[{"id":10357,"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/posts\/2441\/revisions\/10357"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/media\/2941"}],"wp:attachment":[{"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/media?parent=2441"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/categories?post=2441"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cheesecakelabs.com\/blog\/wp-json\/wp\/v2\/tags?post=2441"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}