<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nikhil Sikka on Medium]]></title>
        <description><![CDATA[Stories by Nikhil Sikka on Medium]]></description>
        <link>https://medium.com/@nikhilsikka?source=rss-3becfcd4ed09------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*0EHCStZjnJgza8i7p4lAQw.jpeg</url>
            <title>Stories by Nikhil Sikka on Medium</title>
            <link>https://medium.com/@nikhilsikka?source=rss-3becfcd4ed09------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 03:33:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nikhilsikka/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Using CSS Design Systems with Component Based Architectures]]></title>
            <link>https://medium.com/vizhen/using-css-design-systems-with-component-based-architectures-3fcd1195a97b?source=rss-3becfcd4ed09------2</link>
            <guid isPermaLink="false">https://medium.com/p/3fcd1195a97b</guid>
            <category><![CDATA[css]]></category>
            <category><![CDATA[atomic-design]]></category>
            <category><![CDATA[component-based-design]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[styling-tips]]></category>
            <dc:creator><![CDATA[Nikhil Sikka]]></dc:creator>
            <pubDate>Fri, 21 Jun 2019 11:31:14 GMT</pubDate>
            <atom:updated>2019-06-21T11:31:14.360Z</atom:updated>
            <content:encoded><![CDATA[<p>Some companies pride themselves on their super scalable code structure and the awesome technologies they use. Some of them are right, some of them forget CSS, which can make developers pull their hair out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*gdK__S0SyCdasscIs_1Slw.gif" /><figcaption>We’ve all been there</figcaption></figure><p>Now, I am not saying they don’t know how to do it, but, in most of the teams, the developers pay very less attention to the styling of the entire application. This isn’t a good thing as, when the company grows, you have more users joining in the party and we all know it by now how much the users love a good design and experience. <em>(Ask Orkut, how they lost the social media war because of a lot of reasons including a big one in the form of </em><a href="https://medium.com/@PachaelPhillip/case-study-reasons-why-googles-orkut-failed-after-facebook-was-launched-92dd8a7abf0"><em>Visual Appeal and User Friendliness</em></a><em>. )</em></p><h3>So What to do?</h3><p>Building features is fun and really important, not gonna deny that, especially in the beginning. But, when the product matures up the application needs to look better and feel better. If you’ve heard of the Maslow’s Hierarchy of needs, you’ll know in order for humans to be satisfied, they must get all of their needs fulfilled. (i.e ultimate gratification!) However, the most basic needs, like food, water, sleep etc needs to be fulfilled before they can go about buying the new Mac Pro. <em>(Seriously, why will someone pay 6k for a </em><a href="https://www.idownloadblog.com/2019/06/20/youtuber-mac-pro-cheese-grater/"><em>cheese grater</em></a><em>?). </em>And the same can actually be applied on to the design of any application out there <em>(it kind of already is).</em></p><p>Developers first build the raw features, not even remotely giving a crap about building that sexy looking primary button with those enthralling box-shadows that even Google would be proud of…. and for good reason. Initially, what&#39;s more important is to build the feature that allows the user to click the button and make the action. Cause if there are no users, who are gonna be looking at that button anyway? The visual appeal kicks in as and when the product matures up. But then, when it does, the developers will have a huge problem on their hands, as almost all of us are guilty of writing a horribly structured CSS code, initially convincing ourselves — “I’m gonna refactor this monstrosity later”. TL;DR — never happens, or at least not how you expect it to be.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*kPflXpch8tY5TLV1.png" /><figcaption>There are better ways than spamming your CSS with !important</figcaption></figure><h3>So what am I getting at?</h3><p>Well, ever since the early 2010s, when a host of JS frameworks started popping up everywhere, people started thinking in a bit more in a Component Based Architecture (CBA) style as compared to the traditional Model-View-Controller (MVC). Which isn’t actually bad to begin with. It encourages reusability, forcing developers to write DRY code along with single-responsibility. But, the problem is even though the features got the attention they wanted, the little guy (CSS) and the problems related to it got ignored more or less.</p><p>Because of that, there is a huge, massive pile of CSS that no one wants to touch, cause if they do, it might end up doing what Barry Allen did to the timeline (#Flashpoint). Often, it leads to bugs everywhere in the rest of the application and sometimes it is so chaotic that nothing changes because one style is being overridden by another which is then being overridden by one more which is being overridden by a third party library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*onUAS8iTmumioOiC.jpg" /><figcaption>What happens you change the colour from Purple to Red in a CSS monolith.</figcaption></figure><p>If only we could structure our app in a way that when the designer wants the developer to change the height of the primary button on every page by 2px, the developer doesn’t end up spending doing the same until his kid graduates.</p><p>Well, we can actually, there are now hosts of frameworks/guidelines/design-systems (whatever fits) out there like ITCC, BEM, SMACSS, Atomic Design etc. They all have their pros/cons and there are always tradeoffs when you’re dealing with options in the software world. No tech is perfect and every tech has its purpose and use case. But, if we talk about the ability to implement design changes quickly and easily, one of these things stand out a lot — Atomic Design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HArOrHRavH9gpUzs.jpg" /></figure><p>Now, In no way I’m saying this is the best, but when it comes to making widespread changes quickly this one really takes the cake (if implemented correctly)</p><h3>My Pick — Atomic Design + OOCSS</h3><p><em>I’m sure you must have heard of this system a lot by now, if not just give this a </em><a href="http://bradfrost.com/blog/post/atomic-web-design/"><em>read</em></a><em> as I won&#39;t dwell deeper into explaining this much here.</em></p><p>Now, along with your choice of JS framework, this design pattern works really well, especially if you’re working in a Component Based Architecture as you don’t really have to think so much into dividing your CSS initially, as you think about the React component while building a feature, and you divide them into single purpose and small components so its scalable, you just need to do the exact same for the CSS you write for those components except, you use Atomic Design to set up the folder structure and division reasoning.</p><p>In Atomic Design, It goes without saying smallest are <strong>Atoms<em> </em></strong>and at times<em> </em><strong>Molecules</strong>, which in turn come together to create <strong>Organisms</strong>, which are used to create the various <strong>Templates</strong> and <strong>Pages</strong> of our Application. But, while doing that, you create a unidirectional cascading effect of styles which allows you to change the button height your designer asked for in minutes. (Who doesn’t want that?).</p><p>So, if you want to change the box-shadow of one specific button inside a huge page created using multiple Templates created using this system, all you now need to do is change it in ONE Atom in just ONE place and boom.</p><p>Now, Atomic Design tells you how to split up and structure your Styles to have a sturdy and scalable system in place. But doesn’t stop you from using any naming convention you might prefer. I would personally go for the <a href="https://www.smashingmagazine.com/2011/12/an-introduction-to-object-oriented-css-oocss/">OOCSS (Object Oriented CSS)</a> along with Atomic Design as it really syncs up well with it.</p><h3>The Pros?</h3><p>It goes without saying, every design system solves one or the other problem. But Atomic Design specifically, really helps in increasing the speed of changes in more complex apps the further the code grows. It’s not something you’ll start appreciating from the get-go, but I can assure you it’ll be super satisfying when you are able to change tiniest of details in minutes and see it be properly changed everywhere it&#39;s used.</p><ol><li>It helps in reducing the time taken to do simple tasks.</li><li>Removes Inconsistencies and redundancies in CSS due to the code being reused.</li><li>Reduces the risk of screwing up other things when changing something small, as it happens in those big spaghetti stylesheets we see everywhere.</li><li>You end up getting a really clean component library of your own that can then be shared across projects and teams really easily.</li></ol><h3>Any Cons?</h3><p>Well, as I mentioned before, every technology you use has its pros/cons and tradeoffs depending upon the purpose of the use and situation and the people using it.</p><ol><li>Breaking up an app into smaller bits may be overkill for something as simple as a static portfolio website.</li><li>It requires a LOT (and I mean LOT) of discipline in the team that is working with it.</li><li>It requires someone who can actually take charge and call shots when abstracting requirements and executing the implementation of the same.</li><li>Any new developers will need to buy into the philosophies and require additional on-boarding so they can contribute properly.</li></ol><p>In the end, I feel it’s always about comfort and adaptability along with the skillset of the team. We still don’t, unfortunately, have a one-system-fits-all solution, so we all need to find the one that fits us the best. It’s a long post, I realise that. But I’m hoping it helps at-least one more person out there!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3fcd1195a97b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/vizhen/using-css-design-systems-with-component-based-architectures-3fcd1195a97b">Using CSS Design Systems with Component Based Architectures</a> was originally published in <a href="https://medium.com/vizhen">TheCleanCoder</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>