<?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" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ CSS Framework - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ CSS Framework - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 24 May 2026 22:25:07 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/css-framework/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ The Best CSS Frameworks to Use in Your Projects ]]>
                </title>
                <description>
                    <![CDATA[ By Victor Ikechukwu CSS has come a long way over the past few years. In the past, you'd use CSS to create simple-looking web applications that rely on HTML tables and CSS floats as their layout systems. And now you can architect complex interactive u... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/best-css-frameworks-for-frontend-devs/</link>
                <guid isPermaLink="false">66d46171677cb8c6c15f317b</guid>
                
                    <category>
                        <![CDATA[ CSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS Framework ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Front-end Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 13 Feb 2024 21:18:47 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2024/02/BEST-CSS.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Victor Ikechukwu</p>
<p>CSS has come a long way over the past few years. In the past, you'd use CSS to create simple-looking web applications that rely on HTML tables and CSS floats as their layout systems. And now you can architect complex interactive user interfaces that are appealing with elegant designs.</p>
<p>But as advanced as CSS has become, writing out CSS styles from scratch for extensive web applications can be time-consuming. It can also lead to the repetition of styles, longer CSS files, cross-browser compatibility errors, and generally a more complex codebase.</p>
<p>To solve this challenge, CSS frameworks emerged as a solution. CSS frameworks introduced a means for developers to adopt a set of pre-defined and standardized CSS styles and components to create consistent, appealing, and responsive user interfaces.</p>
<p>But with so many CSS frameworks to choose from, deciding on the right framework for your application can be difficult. You'll want to conduct a proper comparison that accounts for the overall features of each CSS framework, so you can choose the most suitable option that fits your needs.</p>
<p>In this article, we’ll explore what CSS frameworks are, their benefits and limitations, and how you can get started using them. We’ll also look at the most prominent and used CSS frameworks you should know.</p>
<p>In the end, you'll have a good sense of how CSS frameworks work and which to use to meet your project's needs. Let's get started.</p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li><p><a class="post-section-overview" href="#heading-what-are-css-frameworks">What are CSS Frameworks?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-why-should-you-use-css-frameworks">Why Should You Use CSS Frameworks?</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-types-of-css-frameworks">Types of CSS Frameworks</a></p>
</li>
</ul>
<ul>
<li><a class="post-section-overview" href="#heading-9-css-frameworks-you-should-know">9 CSS Frameworks You Should Know</a></li>
</ul>
<ul>
<li><p><a class="post-section-overview" href="#heading-bootstrap">Bootstrap</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-tailwind-css">Tailwind CSS</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-material-ui">Material UI</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-styled-components">styled-components</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-foundation">Foundation</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-chakra-ui">Chakra UI</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-emotion">Emotion</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-bulma">Bulma</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-pure-css">Pure CSS</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-choose-the-right-css-framework-for-your-project">How to Choose the Right CSS Framework for Your Project</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-final-thoughts">Final Thoughts</a></p>
</li>
</ul>
<h2 id="heading-what-are-css-frameworks">What are CSS Frameworks?</h2>
<p>CSS frameworks are a set of pre-written and ready-to-use CSS styles and stylesheets that provide a set of styles and components for styling markup. They streamline the development process by offering a foundation of reusable CSS styles for common design elements and layouts.</p>
<p>CSS frameworks are used to create familiar and consistent user interfaces, simplify responsive design, and enhance collaboration among development teams.</p>
<h2 id="heading-why-should-you-use-css-frameworks">Why Should You Use CSS Frameworks?</h2>
<p>CSS frameworks offer numerous benefits that make them indispensable tools for web development. Here are some advantages that CSS frameworks provide:</p>
<p><strong>Faster development time</strong>: CSS frameworks come with pre-built components and styles, eliminating the need to write everything from scratch. This speeds up the development process and allows developers to focus on customizing and fine-tuning specific aspects of their projects rather than building from scratch.</p>
<p><strong>Consistent style and design</strong>: CSS frameworks help provide a cohesive and consistent look across different components and pages. They ensure that all styles, UI elements, buttons, and typography maintain a unified design language, saving developers from spending excessive time on styling and ensuring a better user experience.</p>
<p><strong>Improve collaboration and maintainability</strong>: CSS frameworks usually offer well-documented libraries and established conventions, making it easier for developers to collaborate and maintain codebases. With a common codebase and extensive documentation, developers can easily understand and work with each other's code.</p>
<h2 id="heading-types-of-css-frameworks">Types of CSS Frameworks</h2>
<p>CSS frameworks aren’t a one-size-fits-all. They come in different forms, and each category has its own focus and advantages. Knowing the categories CSS frameworks can fit into will be helpful in letting you know what to expect from each framework.</p>
<p>Let's look at the main types of CSS frameworks now.</p>
<h3 id="heading-component-based-frameworks">Component-Based Frameworks</h3>
<p>This is the origin of CSS frameworks. Component-based frameworks offer a set of pre-built UI components that developers can plug into their applications to assemble interfaces quickly. The goal is to provide a modular and reusable design system that can help you create consistent and visually appealing web apps without starting from scratch every time.</p>
<h3 id="heading-utility-first-frameworks">Utility-First Frameworks</h3>
<p>The idea behind utility-first frameworks is that CSS should not be descriptive and should not heavily rely on your markup (for example, a “.header” class that signifies a navigation bar or website's header), but instead should be based on functionality (for example, “.text-align-center”).</p>
<p>Rather than confining your application’s design to only what is provided by the framework, utility-first frameworks offer CSS styles and classes that only do one thing (or a small set of things) as building blocks to extend and customize the design of your application beyond the limitations of a component-based framework.</p>
<h3 id="heading-css-in-js">CSS-in-JS</h3>
<p>With the rise of JavaScript libraries like React, CSS-in-JS frameworks were created to let developers manipulate styles directly in JavaScript by including CSS in their JavaScript markup.</p>
<p>CSS-in-JS utilizes the dynamic nature of JavaScript to provide a way of writing interactive CSS styles that are performant and based on user data and interactions.</p>
<p>There are more types of CSS frameworks available, but these three categories cover the most notable groups.</p>
<p>Note that there isn’t a fine line that separates these concerns. Most CSS frameworks can overlap into multiple categories – for example, a component-based framework can give you utilities, and a utility-based framework can give you components as well</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/screely-1707158060937-1.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>A diagram showing some categories of CSS frameworks and how the intertwine with each other</em></p>
<p>For example, consider the diagram above that shows how the three categories of CSS frameworks can intertwine.</p>
<h2 id="heading-9-css-frameworks-you-should-know">9 CSS Frameworks You Should Know</h2>
<p>Now that you have a clear understanding of what CSS frameworks are and their different types, let's have a look at some of the most prominent and most-used CSS frameworks you should know.</p>
<h2 id="heading-bootstrap">Bootstrap</h2>
<p>Bootstrap began as an internal tool at X (formerly, Twitter) to maintain a consistent look across the platform. Then it was open-sourced in 2011 for the wider web development community to use. <a target="_blank" href="https://getbootstrap.com/">Bootstrap</a> is one of the most widely used CSS frameworks, with a focus on responsive, mobile-first web design.</p>
<p>Bootstrap offers a robust collection of CSS and JavaScript components, such as its grid system and responsive UI components like buttons, navigation menus, and forms, that streamline the process of building clean and consistent web layouts.</p>
<p>Bootstrap has large community support and over a hundred thousand GitHub stars. And though it may seem bulky when compared to modern options, it's still one of the most used CSS frameworks you can use to build good-looking and thematically coherent web applications without needing to be an expert in CSS and web design.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/getbootstrap.com_-1.png" alt="alt_text" width="600" height="400" loading="lazy"></p>
<p><em>An image of the Bootstrap framework official website</em></p>
<h3 id="heading-how-to-use-bootstrap">How to use Bootstrap</h3>
<p>To get started with Bootstrap, you need to pull its source files into your project. In a JavaScript framework like React, you can install Bootstrap into your project using a package manager like npm.</p>
<pre><code class="lang-javascript">npm install bootstrap
</code></pre>
<p>Next, import Bootstrap’s CSS at the top of your application's main entry file, typically <code>src/index.js</code>:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> <span class="hljs-string">'bootstrap/dist/css/bootstrap.min.css'</span>;
</code></pre>
<p>This will import Bootstrap CSS and make it available for use throughout your application. Now you can use Bootstrap components in your application like this:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>;

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">App</span>(<span class="hljs-params"></span>) </span>{

  <span class="hljs-keyword">return</span> (

    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"container"</span>&gt;</span>

      <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Hello, Bootstrap in React!<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>

      <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"btn btn-primary"</span>&gt;</span>Click Me<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>

    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>

  );

}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> App;
</code></pre>
<p>To learn more about Bootstrap, refer to the <a target="_blank" href="https://getbootstrap.com/docs/5.0/getting-started/introduction/">official Bootstrap documentation</a> for detailed guidance, examples, and additional resources.</p>
<h2 id="heading-tailwind-css">Tailwind CSS</h2>
<p><a target="_blank" href="https://github.com/tailwindlabs/tailwindcss">Tailwind CSS</a> is a utility-first CSS framework that allows you to rapidly build custom user interfaces directly in markup files.</p>
<p>As a utility-first framework, Tailwind abstracts from the constraints of a component-based framework, for example, Bootstrap.</p>
<p>Though component-based frameworks like Bootstrap excel at streamlining the process of building web layouts by providing pre-defined UI components, they’re opinionated in that you’re confined to the current design system and ecosystem of the framework. Trying to extend or customize your application’s layout beyond what the framework provides can prove to be a workaround.</p>
<p>Tailwind offers a robust system of utility and helper classes as building blocks that can be composed to build any design directly in your markup. With <a target="_blank" href="https://2023.stateofcss.com/en-US/css-frameworks/">Tailwind ranking as the second most used framework in the State of CSS 2023 survey at about 76%</a>, it's the best choice to rapidly prototype and speed up the development process in line with modern web standards.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/tailwindcss.com_-1.png" alt="alt_text" width="600" height="400" loading="lazy"></p>
<p><em>An image of the Tailwind CSS framework official website</em></p>
<h3 id="heading-how-to-use-tailwind-css">How to use Tailwind CSS</h3>
<p>Install <code>tailwindcss</code> via a package manager, and create your <code>tailwind.config.js</code> file to configure and customize Tailwind CSS for your application.</p>
<pre><code class="lang-javascript">npm install -D tailwindcss

npx tailwindcss init
</code></pre>
<p>Add the paths to all your template and markup files in your <code>tailwind.config.js</code> file as well as other configurations.</p>
<pre><code class="lang-javascript"><span class="hljs-comment">/** <span class="hljs-doctag">@type <span class="hljs-type">{import('tailwindcss').Config}</span> </span>*/</span>

<span class="hljs-built_in">module</span>.exports = {

  <span class="hljs-attr">content</span>: [<span class="hljs-string">"./src/**/*.{html,js,jsx,ts,tsx}"</span>],

  <span class="hljs-attr">theme</span>: {

    <span class="hljs-attr">extend</span>: {},

  },

  <span class="hljs-attr">plugins</span>: [],

}
</code></pre>
<p>Add the<code>@tailwind</code> directives for each of Tailwind’s layers to your main CSS file and ensure the CSS file is imported into the main entry file of your application.</p>
<pre><code class="lang-javascript">@tailwind base;

@tailwind components;

@tailwind utilities;
</code></pre>
<p>Now you can apply utility classes directly in your HTML markup to style your components.</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">Button</span>(<span class="hljs-params">{children}</span>) </span>{

  <span class="hljs-keyword">return</span> (

      <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded"</span>&gt;</span>

        {children}

      <span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span></span>

  );

}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Button;
</code></pre>
<p>You can learn more about setting up and using Tailwind CSS based on your project environment and advanced usage by going through the <a target="_blank" href="https://tailwindcss.com/docs/installation/framework-guides">official Tailwind CSS documentation</a>.</p>
<h2 id="heading-material-ui">Material UI</h2>
<p>Material UI is a component-based CSS framework for building user interfaces in React applications. It is based on Google's open-source design system, <a target="_blank" href="https://m3.material.io/">Material Design</a>, and provides a rich collection of pre-built components and styles.</p>
<p>As one of the <a target="_blank" href="https://github.com/mui/material-ui">largest UI communities</a> in the React ecosystem, Material UI offers a modern and visually appealing design system. It features a suite of customization options that make it easy for developers to implement custom design systems on top of the library, making it a popular choice for creating consistent UIs in React applications.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/mui.com_.png" alt="alt_text" width="600" height="400" loading="lazy"></p>
<p><em>An image of the MUI kit official website</em></p>
<h3 id="heading-how-to-use-material-ui">How to use Material UI</h3>
<p>Install Material UI's core package and any <a target="_blank" href="https://mui.com/material-ui/getting-started/installation/">additional dependencies</a> you need.</p>
<pre><code class="lang-javascript">npm install @mui/material @emotion/react @emotion/styled
</code></pre>
<p>Now you can Import any Material UI component into your React components and use them in your JSX code.</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> Button <span class="hljs-keyword">from</span> <span class="hljs-string">'@mui/material/Button'</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">ButtonUsage</span>(<span class="hljs-params"></span>) </span>{

  <span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Button</span> <span class="hljs-attr">variant</span>=<span class="hljs-string">"contained"</span>&gt;</span>Hello world<span class="hljs-tag">&lt;/<span class="hljs-name">Button</span>&gt;</span></span>;

}
</code></pre>
<p>Checkout <a target="_blank" href="https://mui.com/">Material UI documentation</a> for detailed usage guidelines, API references, and examples</p>
<h2 id="heading-styled-components">styled-components</h2>
<p><a target="_blank" href="https://styled-components.com/">styled-components</a> is one of the most prominent CSS-in-JS libraries. It provides a seamless way to create and manage CSS styles within JavaScript files and components.</p>
<p>While it was originally designed specifically for the React ecosystem, styled-components have advanced so that you can now use it with vanilla JavaScript or other JavaScript frameworks like Vue.</p>
<p>As the <a target="_blank" href="https://2023.stateofcss.com/en-US/css-in-js/">most popular CSS-in-JS library by GitHub stars and weekly NPM downloads</a>, styled-components offers a highly flexible and intuitive approach to styling, making it easier to build reusable and self-contained UI components.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/styled-components.com_.png" alt="alt_text" width="600" height="400" loading="lazy"></p>
<p><em>An image of the Styled-components official website</em></p>
<h3 id="heading-how-to-use-styled-components">How to use styled-components</h3>
<p>Install the styled-components package via npm or yarn.</p>
<pre><code class="lang-javascript">npm install styled-component
</code></pre>
<p>Now, you can define your styled components by importing the styled function and using it to create styled versions of HTML elements or custom components.</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> styled, { css } <span class="hljs-keyword">from</span> <span class="hljs-string">'styled-components'</span>

<span class="hljs-keyword">const</span> Title = styled.h1<span class="hljs-string">`

  font-size: 1.5em;

  text-align: center;

  color: #BF4F74;

`</span>;

render(

  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>

    Title&gt;

      Hello World!

    <span class="hljs-tag">&lt;/<span class="hljs-name">Title</span>&gt;</span></span>

  &lt;/div&gt;

);
</code></pre>
<p>Refer to the official <a target="_blank" href="https://styled-components.com/">styled-components documentation</a> for comprehensive guides, examples, and advanced features.</p>
<h2 id="heading-foundation">Foundation</h2>
<p><a target="_blank" href="https://get.foundation/">Foundation</a> is the closest alternative to Bootstrap. It's not just a CSS framework, but a comprehensive toolkit for <a target="_blank" href="https://get.foundation/sites.html">styling web applications</a>, architecting <a target="_blank" href="https://get.foundation/emails.html">email templates</a>, which are known to be notoriously hard, and <a target="_blank" href="https://zurb.com/playground/motion-ui">integrating with ZURB’s Motion UI</a> to create advanced CSS animations.</p>
<p>It includes common UI components like Bootstrap but is more utility-focused and gives developers more options for customizing components. With almost too many features, it can be considerably more complex and harder to fully understand how everything works compared to other frameworks.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/get.foundation_.png" alt="alt_text" width="600" height="400" loading="lazy"></p>
<p><em>An image of the Foundation framework official website</em></p>
<h3 id="heading-how-to-use-foundation">How to use Foundation</h3>
<p>You can install Foundation in your project with a package manager.</p>
<pre><code class="lang-javascript">npm install foundation-sites
</code></pre>
<p>Now you can use its styles and components in your application.</p>
<pre><code class="lang-javascript">&lt;div <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"card"</span> style=<span class="hljs-string">"width: 300px;"</span>&gt;

  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-divider"</span>&gt;</span>

    This is a header

  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>

  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"assets/img/generic/rectangle-1.jpg"</span>&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"card-section"</span>&gt;</span>

    <span class="hljs-tag">&lt;<span class="hljs-name">h4</span>&gt;</span>This is a card.<span class="hljs-tag">&lt;/<span class="hljs-name">h4</span>&gt;</span>

    <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>It has an easy to override visual style.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>

  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>

<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
</code></pre>
<p>Consult <a target="_blank" href="https://get.foundation/frameworks-docs.html">Foundation’s official documentation</a> for detailed instructions, examples, and additional resources.</p>
<h2 id="heading-chakra-ui">Chakra UI</h2>
<p>The brainchild of Nigerian developer Segun Adebayo, <a target="_blank" href="https://chakra-ui.com/">Chakra UI</a> falls into the same category as MUI as a component library and CSS framework for React applications. It emphasizes accessibility, developer ergonomics, and a customizable design system.</p>
<p>Chakra UI provides a collection of well-designed and accessible components that can be easily customized to match your project's branding and style.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/chakra-ui.com_--1-.png" alt="alt_text" width="600" height="400" loading="lazy"></p>
<p><em>An image of the Chakra CSS framework official website</em></p>
<h3 id="heading-how-to-use-chakra-ui">How to use Chakra UI</h3>
<p>To get started, install the Chakra UI package via a package manager.</p>
<pre><code class="lang-javascript">npm i @chakra-ui/react @emotion/react @emotion/styled framer-motion
</code></pre>
<p>After installing Chakra UI, you need to wrap your application or specific components with the <code>ChakraProvider</code> to make the Chakra UI components available.</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>

<span class="hljs-comment">// 1. import `ChakraProvider` component</span>

<span class="hljs-keyword">import</span> { ChakraProvider } <span class="hljs-keyword">from</span> <span class="hljs-string">'@chakra-ui/react'</span>

<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">App</span>(<span class="hljs-params"></span>) </span>{

  <span class="hljs-comment">// 2. Wrap ChakraProvider at the root of your app</span>

  <span class="hljs-keyword">return</span> (

    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">ChakraProvider</span>&gt;</span>

      <span class="hljs-tag">&lt;<span class="hljs-name">TheRestOfYourApplication</span> /&gt;</span>

    <span class="hljs-tag">&lt;/<span class="hljs-name">ChakraProvider</span>&gt;</span></span>

  )

}
</code></pre>
<p>Now you can use Chakra UI's components in your JSX code to build your user interface.</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { Button} <span class="hljs-keyword">from</span> <span class="hljs-string">'@chakra-ui/react'</span>

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">ButtonUsage</span>(<span class="hljs-params"></span>) </span>{

  <span class="hljs-keyword">return</span> <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">Button</span> <span class="hljs-attr">colorScheme</span>=<span class="hljs-string">'blue'</span>&gt;</span>Hello world<span class="hljs-tag">&lt;/<span class="hljs-name">Button</span>&gt;</span></span>;

}
</code></pre>
<p>To learn more, you can check out the <a target="_blank" href="https://chakra-ui.com/">Chakra UI documentation</a> for detailed usage guidelines, component examples, and theming options</p>
<h2 id="heading-emotion">Emotion</h2>
<p><a target="_blank" href="https://emotion.sh/">Emotion</a> is built off the concepts of styled-components to be a more performant, lightweight, and feature-rich CSS-in-JS library. It does this by utilizing features such as source maps, labels, and testing utilities.</p>
<p>Emotion is framework-agnostic and has a syntax that is as close to CSS as possible, making it easier to adopt.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/Screenshot-2024-02-12-at-1.35.08-PM.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><em>Image of the Emotion homepage</em></p>
<h3 id="heading-how-to-use-emotion">How to use Emotion</h3>
<p>The <a target="_blank" href="https://www.npmjs.com/package/@emotion/css">@emotion/css</a> package is framework-agnostic and it's the simplest way to use Emotion. To get started, install the package via a package manager.</p>
<pre><code class="lang-javascript">npm i @emotion/css
</code></pre>
<p>Now you can use Emotion's CSS API to generate and compose CSS styles.</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> { css } <span class="hljs-keyword">from</span> <span class="hljs-string">'@emotion/css'</span>

<span class="hljs-keyword">const</span> color = <span class="hljs-string">'white'</span>

render(

  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>

    <span class="hljs-attr">className</span>=<span class="hljs-string">{css</span>`

      <span class="hljs-attr">padding:</span> <span class="hljs-attr">32px</span>;

      <span class="hljs-attr">background-color:</span> <span class="hljs-attr">hotpink</span>;

      <span class="hljs-attr">font-size:</span> <span class="hljs-attr">24px</span>;

      <span class="hljs-attr">border-radius:</span> <span class="hljs-attr">4px</span>;

      &amp;<span class="hljs-attr">:hover</span> {

        <span class="hljs-attr">color:</span> ${<span class="hljs-attr">color</span>};

      }

    `}

  &gt;</span>

    Hover to change color.

  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>

)
</code></pre>
<p>Refer to the official <a target="_blank" href="https://emotion.sh/docs/introduction">Emotion documentation</a> for detailed instructions, usage examples, and advanced features.</p>
<h2 id="heading-bulma">Bulma</h2>
<p><a target="_blank" href="https://bulma.io/">Bulma</a> is a modern and lightweight CSS framework that offers a flexible grid system and a variety of CSS styles and components. It focuses on simplicity, modularity, and ease of use.</p>
<p>Bulma emphasizes that it is "environment agnostic," meaning that it is just the style layer on top of the logic, so it integrates capably with any JS environment.</p>
<p>Bulma is more of a collection of CSS classes than UI components. It has a clean and intuitive syntax and is less complex and easier to understand compared to other component-based frameworks like Foundation and Bootstrap. This makes it an ideal choice for beginners or developers who value simplicity and want to quickly build responsive websites.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/bulma.io_.png" alt="alt_text" width="600" height="400" loading="lazy"></p>
<p><em>An image of the Bulma CSS framework official website</em></p>
<h3 id="heading-how-to-use-bulma">How to use Bulma</h3>
<p>To get started, you need to download Bulma for your project.</p>
<pre><code class="lang-javascript">npm install bulma
</code></pre>
<p>Next, import Bulma CSS styles into your project's main stylesheet.</p>
<pre><code class="lang-javascript">@<span class="hljs-keyword">import</span> <span class="hljs-string">'bulma/css/bulma.css'</span>;
</code></pre>
<p>Now, you're ready to start styling your project using Bulma's classes and components.</p>
<p>You can learn more about customizing Bulma's styles, overriding CSS variables, or modifying the Sass source files from <a target="_blank" href="https://bulma.io/documentation/">the official documentation</a>.</p>
<h2 id="heading-pure-css">Pure CSS</h2>
<p><a target="_blank" href="https://purecss.io/">Pure CSS</a> is a minimalistic and lightweight CSS framework that aims to provide a set of small, responsive CSS modules and styles as a starting point for styling web applications without imposing any design decisions. It has one of the smallest bundle sizes of 3.5KB (compressed) when all modules are used.</p>
<p>Pure CSS is suitable for projects where a minimal design approach is desired or when you prefer to write your styles from scratch.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2024/02/pure-css.png" alt="alt_text" width="600" height="400" loading="lazy"></p>
<p><em>An image of the Pure.CSS official website</em></p>
<h3 id="heading-how-to-use-pure-css">How to use Pure CSS</h3>
<p>You can add Pure CSS to your page via the free jsDelivr CDN. Add the following <code>&lt;link&gt;</code> element to your page's <code>&lt;head&gt;</code>, before your project's stylesheets.</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"stylesheet"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/pure-min.css"</span> <span class="hljs-attr">integrity</span>=<span class="hljs-string">"sha384-X38yfunGUhNzHpBaEBsWLO+A0HDYOQi8ufWDkZ0k9e0eXz/tH3II7uKZ9msv++Ls"</span> <span class="hljs-attr">crossorigin</span>=<span class="hljs-string">"anonymous"</span>&gt;</span>
</code></pre>
<p>Refer to the official <a target="_blank" href="https://purecss.io/">Pure CSS documentation</a> for detailed usage guidelines, examples, and additional resources.</p>
<h2 id="heading-how-to-choose-the-right-css-framework-for-your-project">How to Choose the Right CSS Framework for Your Project</h2>
<p>As your applications grow and become bigger, adopting a CSS framework is an invaluable option when it comes to speeding up your workflow.</p>
<p>CSS frameworks help you build good-looking and professional web pages while maintaining consistency in design. But not all frameworks compare equally, as some provide more benefits and advantages.</p>
<p>When choosing the ideal CSS framework for your project, it is crucial to keep in mind various factors that can greatly impact how successful and efficient working with the framework will be for your project.</p>
<p>Some key aspects to consider are:</p>
<ul>
<li><p><strong>Customizability</strong>: The level of customization the framework offers. Does the framework let you customize and extend your styles beyond the framework’s design system to suit your specific needs and preferences? Or is it opinionated and vendor-locked so that you become confined to the framework’s design-system and ecosystem?</p>
</li>
<li><p><strong>Learning curve</strong>: Another factor to consider is the learning curve associated with implementing the framework. How user-friendly is the framework for new learners? What’s the developer experience like? Are there enough documentation and resources available for you to learn and utilize the frameworks effectively?</p>
</li>
<li><p><strong>Community support</strong>: The availability of a supportive and active community is also an important consideration. Dedicated communities of developers who actively contribute to the frameworks' growth and provide assistance to fellow developers (and you!) are a great resource.</p>
</li>
<li><p><strong>How it fits your project</strong>: Lastly, ensuring that the CSS framework you choose is compatible with your project goals and matches its branding and design requirements is essential.</p>
</li>
</ul>
<table><tbody><tr><td><p>A comparison table that compares different factors across the CSS frameworks mentioned in this article</p></td><td><p></p></td><td><p></p></td><td><p></p></td><td><p></p></td><td><p></p></td><td><p></p></td><td><p></p></td><td><p></p></td><td><p></p></td></tr><tr><th><p>Framework</p></th><th><p>Approach</p></th><th><p>Type</p></th><th><p>Customization</p></th><th><p>Community</p></th><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th></tr><tr><th><p>Bootstrap</p></th><td><p>Component-based, uses pre-styled components</p></td><td><p>CSS framework</p></td><td><p>Moderate, offers variables for customization</p></td><td><p>Large and established community</p></td></tr><tr><th><p>Tailwind CSS</p></th><td><p>Utility-first, uses utility classes to build designs</p></td><td><p>Utility framework</p></td><td><p>Highly customizable, based on utility classes</p></td><td><p>Growing community</p></td><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th></tr><tr><th><p>Material UI</p></th><td><p>Component-based, uses pre-styled components</p></td><td><p>React UI framework</p></td><td><p>Moderate, offers variables for customization</p></td><td><p>Strong React community</p></td><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th></tr><tr><th><p>styled-components</p></th><td><p>CSS-in-JS, allows writing CSS within JavaScript</p></td><td><p>Styling library</p></td><td><p>Highly customizable, CSS-in-JS approach</p></td><td><p>Growing adoption</p></td><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th></tr><tr><th><p>Foundation</p></th><td><p>Modular, customizable grid system and components</p></td><td><p>CSS framework</p></td><td><p>High, modular components allow extensive customization</p></td><td><p>Smaller compared to Bootstrap</p></td><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th></tr><tr><th><p>Chakra UI</p></th><td><p>Component-based, focused on accessibility</p></td><td><p>React UI framework</p></td><td><p>Moderate, offers variables for customization</p></td><td><p>Growing community</p></td><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th></tr><tr><th><p>Emotion</p></th><td><p>CSS-in-JS, lightweight and high-performance</p></td><td><p>Styling library</p></td><td><p>Highly customizable with CSS-in-JS</p></td><td><p>Increasing adoption</p></td><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th></tr><tr><th><p>Bulma</p></th><td><p>Modular, based on Flexbox, simple and flexible</p></td><td><p>CSS framework</p></td><td><p>Moderate, offers variables for customization</p></td><td><p>Decent user community</p></td><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th></tr><tr><th><p>Pure CSS</p></th><td><p>Minimalistic, small, and responsive</p></td><td><p>CSS framework</p></td><td><p>Limited, encourages using own styles</p></td><td><p>Smaller community</p></td><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th><th><p></p></th></tr></tbody></table>

<p>The table above gives an overview of the CSS frameworks we covered across different aspects, such as their approach, customization, learning curve, community support, available components, and styles.</p>
<h2 id="heading-final-thoughts">Final Thoughts</h2>
<p>In the coming years, we can expect the emergence of new CSS frameworks and improvements to existing ones. The CSS frameworks discussed in this article are some of the most notable to use for your next project.</p>
<p>It all comes down to which fits with your goals and project requirements. By carefully evaluating and weighing these factors, you can make an informed decision and select the CSS framework that perfectly aligns with your needs and objectives.</p>
<p>Whether you opt for the versatility and flexibility of Tailwind CSS or the simplicity of Pure.CSS, all frameworks offer valuable solutions that can significantly streamline your development time, ensure brand consistency, and improve code maintenance.</p>
<p>So, go ahead and choose the framework that best suits your project, and embark on a journey towards creating visually stunning and highly functional web applications!</p>
<hr>
<p>If you found this article helpful, you can follow me on <a target="_blank" href="http://twitter.com/Victor_codejs">Twitter</a> or connect with me on <a target="_blank" href="https://www.linkedin.com/in/iam-victor-ikechukwu/">LinkedIn</a>. Happy coding!</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ CSS Frameworks vs Custom CSS – What's the Difference? ]]>
                </title>
                <description>
                    <![CDATA[ When it comes to styling web pages, CSS or Cascading Style Sheets is the go-to tool for web developers. CSS is what gives your website that visually appealing look and feel, from colors and fonts to layout and positioning.  But there are two distinct... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/css-frameworks-vs-custom-css/</link>
                <guid isPermaLink="false">66c4c3c2e486f65d4125b7fb</guid>
                
                    <category>
                        <![CDATA[ CSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS Framework ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Joan Ayebola ]]>
                </dc:creator>
                <pubDate>Mon, 30 Oct 2023 14:51:25 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2023/10/Vintage-Colors-Retro-Interactive--Icebreaker-Education-Presentation--1-.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>When it comes to styling web pages, CSS or Cascading Style Sheets is the go-to tool for web developers. CSS is what gives your website that visually appealing look and feel, from colors and fonts to layout and positioning. </p>
<p>But there are two distinct approaches to applying CSS: using a CSS framework or writing custom CSS from scratch. </p>
<p>In this article, we'll explore the pros and cons of both approaches to help you decide which one is the right fit for your web development project.</p>
<h2 id="heading-css-frameworks-a-solid-foundation">CSS Frameworks: A Solid Foundation</h2>
<h3 id="heading-what-are-css-frameworks">What Are CSS Frameworks?</h3>
<p>CSS frameworks are pre-written, reusable sets of CSS rules and components that make it easier to style web pages. They often include predefined styles for common elements like buttons, forms, navigation bars, and grids. </p>
<p>Popular CSS frameworks include Bootstrap, Tailwind CSS, and Bulma.</p>
<h3 id="heading-advantages-of-css-frameworks">Advantages of CSS Frameworks</h3>
<h4 id="heading-1-time-efficiency">1. Time Efficiency</h4>
<p>One of the most significant advantages of using a CSS framework is the time it saves. You can quickly prototype and develop your website without starting from scratch. </p>
<p>With predefined styles and components, you don't need to reinvent the wheel, which is especially handy for tight project deadlines.‌</p>
<pre><code class="lang-html">/* Example: Bootstrap button class */ <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"btn btn-primary"</span>&gt;</span>Primary Button<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
</code></pre>
<h4 id="heading-2-consistency">2. Consistency</h4>
<p>CSS frameworks provide a consistent look and feel across your website. This helps maintain a professional appearance and ensures that your website is user-friendly, as visitors will find it easier to navigate and understand.</p>
<pre><code class="lang-html"><span class="hljs-comment">&lt;!-- Example: Bootstrap navigation bar --&gt;</span> 
<span class="hljs-tag">&lt;<span class="hljs-name">nav</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"navbar navbar-expand-lg navbar-light bg-light"</span>&gt;</span>
<span class="hljs-comment">&lt;!-- Navigation links go here --&gt;</span> 
<span class="hljs-tag">&lt;/<span class="hljs-name">nav</span>&gt;</span>
</code></pre>
<h4 id="heading-3-responsiveness">3. Responsiveness</h4>
<p>Many CSS frameworks are designed to be responsive, meaning they adapt well to different screen sizes and devices. This makes them a great choice for creating mobile-friendly websites without too much extra work.</p>
<pre><code class="lang-html"><span class="hljs-comment">&lt;!-- Example: Bootstrap responsive grid system --&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"row"</span>&gt;</span> 
<span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-sm-6"</span>&gt;</span>Column 1<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span> 
<span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-sm-6"</span>&gt;</span>Column 2<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span> 
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<h3 id="heading-disadvantages-of-css-frameworks">Disadvantages of CSS Frameworks</h3>
<h4 id="heading-1-learning-curve">1. Learning Curve</h4>
<p>While CSS frameworks can save time, they also require learning how to use them effectively. Each framework has its own conventions and classes that you must master. This can be challenging for beginners.</p>
<pre><code class="lang-html">/* Example: Bootstrap class for a responsive grid */
<span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"container"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"row"</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-sm-6"</span>&gt;</span>Column 1<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span> 
<span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"col-sm-6"</span>&gt;</span>Column 2<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span> 
<span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
</code></pre>
<h4 id="heading-2-bloated-code">2. Bloated Code</h4>
<p>CSS frameworks often come with more code than you need. This can result in larger file sizes, which may affect your website's performance. Removing unused styles can be time-consuming.</p>
<h4 id="heading-3-limited-customization">3. Limited Customization</h4>
<p>Frameworks may limit your ability to create a unique design. While you can customize the styles to some extent, you might find it challenging to achieve a truly distinctive look.</p>
<h2 id="heading-custom-css-total-control">Custom CSS: Total Control</h2>
<h3 id="heading-what-is-custom-css">What Is Custom CSS?</h3>
<p>Custom CSS, as the name suggests, involves writing your own styles from scratch. With this approach, you have complete control over every aspect of your website's design. You can create a unique, tailor-made experience for your visitors.</p>
<h3 id="heading-advantages-of-custom-css">Advantages of Custom CSS</h3>
<h4 id="heading-1-complete-control">1. Complete Control</h4>
<p>The primary advantage of custom CSS is complete control. You can design every element of your website exactly as you envision it. This level of customization is ideal for projects that require a unique and brand-specific look.</p>
<pre><code class="lang-html">/* Example: Custom CSS for a unique button */
.custom-button { 
background-color: #ff6600;
color: #fff;
border: none; 
padding: 10px 20px;
border-radius: 5px;
}
</code></pre>
<h4 id="heading-2-minimal-code">2. Minimal Code</h4>
<p>Custom CSS often results in cleaner and more efficient code because you only include what's necessary. This can lead to faster-loading web pages and better performance.</p>
<pre><code class="lang-html">/* Example: Minimal custom CSS for a simple webpage */ 
body {
font-family: Arial, sans-serif;
background-color: #f5f5f5;
}
</code></pre>
<h4 id="heading-3-greater-understanding">3. Greater Understanding</h4>
<p>Writing custom CSS forces you to have a deep understanding of how CSS works. This can make you a better web developer and give you more flexibility in solving design problems.</p>
<h3 id="heading-disadvantages-of-custom-css">Disadvantages of Custom CSS</h3>
<h4 id="heading-1-time-consuming">1. Time-Consuming</h4>
<p>Creating custom CSS from scratch can be time-consuming, especially for larger and more complex websites. It requires a good deal of planning and coding.</p>
<pre><code class="lang-html">/* Example: Complex custom CSS for a multi-page site */ 

/* Styles for the homepage */ 

body.home { /* Custom styles for the homepage */ } 

/* Styles for the contact page */

body.contact { /* Custom styles for the contact page */ }
</code></pre>
<h4 id="heading-2-potential-for-mistakes">2. Potential for Mistakes</h4>
<p>Writing custom CSS leaves room for errors, especially for those who are less experienced. A single mistake can lead to unintended design issues.</p>
<pre><code class="lang-html">/* Example: A common mistake - forgetting to close a CSS rule */
.button { 
background-color: blue; 
color: white;
</code></pre>
<h4 id="heading-3-maintenance">3. Maintenance</h4>
<p>Maintaining custom CSS over time can be a challenge, especially when updating your website or making changes. It's essential to stay organized and document your code well.</p>
<pre><code class="lang-html">/* Example: Well-documented custom CSS */ 
/* Header styles */ 
.header {
background-color: #333;
color: #fff; 
/* ... more styles ... */ }
</code></pre>
<h2 id="heading-which-one-to-choose">Which One to Choose?</h2>
<p>The decision between using a CSS framework and writing custom CSS depends on your specific project and your level of expertise. </p>
<p>Here are some factors to consider:</p>
<h3 id="heading-choose-a-css-framework-when">Choose a CSS Framework When:</h3>
<ul>
<li>You have a tight deadline and need to build a website quickly.</li>
<li>You are working on a project that doesn't require a highly customized design.</li>
<li>You want a responsive website without spending extra time on media queries.</li>
</ul>
<h3 id="heading-choose-custom-css-when">Choose Custom CSS When:</h3>
<ul>
<li>You need a unique and highly customized design that reflects your brand or personality.</li>
<li>You have the time and expertise to create your styles from scratch.</li>
<li>You want to keep your code clean and efficient, optimizing for performance.</li>
</ul>
<h3 id="heading-how-to-combine-both-approaches">How to Combine Both Approaches</h3>
<p>In some cases, it might make sense to use a combination of both CSS frameworks and custom CSS. </p>
<p>You can start with a framework to save time and then add custom CSS to make specific design adjustments or add unique features.</p>
<pre><code class="lang-html">/* Example: Adding custom CSS on top of a framework */ 
.custom-button { 
background-color: #ff6600; 
color: #fff; 
border: none; 
padding: 10px 20px;
border-radius: 5px;
} 
/* Use the custom class on specific buttons */
<span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"btn custom-button"</span>&gt;</span>Custom Button<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
</code></pre>
<h2 id="heading-conclusion">Conclusion</h2>
<p>CSS frameworks and custom CSS each have their own strengths and weaknesses. Your choice should align with your project requirements, your expertise, and your goals. </p>
<p>There is no one-size-fits-all answer, as the decision ultimately depends on the unique context of your web development project.</p>
<p>In the end, whether you opt for the convenience of a CSS framework or the full control of custom CSS, what matters most is the quality and usability of your website. A well-styled and user-friendly site will ultimately determine your success in the world of web development.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ CSS Border – Style and HTML Code Examples ]]>
                </title>
                <description>
                    <![CDATA[ In CSS, everything is a box. And each box – whether it's text, an image, a div, a span, or any other element – has a border that separates its edges from other boxes around it.  The CSS border property allows us to do several things with the border ]]>
                </description>
                <link>https://www.freecodecamp.org/news/css-border-style-and-html-code-examples/</link>
                <guid isPermaLink="false">66adf096f452caf50fb1fddd</guid>
                
                    <category>
                        <![CDATA[ CSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS Framework ]]>
                    </category>
                
                    <category>
                        <![CDATA[ HTML ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kolade Chris ]]>
                </dc:creator>
                <pubDate>Wed, 04 Aug 2021 23:25:30 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/08/Css-border--1-.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>In CSS, everything is a box. And each box – whether it's text, an image, a div, a span, or any other element – has a border that separates its edges from other boxes around it. </p>
<p>The CSS border property allows us to do several things with the border of individual boxes. Getting familiar with this property can really help you debug more effectively and design your web pages more beautifully.</p>
<p>In this tutorial, we will look at CSS's border property in detail. This will help you get comfortable with it and start using it in your next coding project. </p>
<h2 id="heading-what-is-the-css-border-property">What is the CSS <code>border</code> property?</h2>
<p><code>border</code> is not all the border property entails – though it is important to note that it’s a very useful shorthand, which we will get to later in this tutorial. </p>
<p>So, in addition there are the <code>border-width</code>, <code>border-style</code>, <code>border-color</code>, and <code>border-radius</code> sub-properties. Let's take a look at each of them one by one.</p>
<h3 id="heading-css-border-width-property">CSS <code>border-width</code> property</h3>
<p>You use the <code>border-width</code> property to specify the width of a border. The value is commonly expressed in pixels (px), but it can be expressed in rem, em, and percentage (%). </p>
<p>And it doesn’t end there – this property also takes <code>thin</code>, <code>medium</code>, and <code>thick</code> as values. </p>
<p>The <code>border-width</code> property is a shorthand for <code>border-top-width</code>, <code>border-right-width</code>, <code>border-bottom-width</code> and <code>border-left-width</code>, moving in a clockwise direction. So, if you want, you can apply different width values to the border-top, border-right, border-bottom, and border-right. </p>
<h3 id="heading-css-border-style-property">CSS <code>border-style</code> property</h3>
<p>With the <code>border-style</code> property, you get access to different styles you can apply to the border of a box. It takes <code>none</code> (the default), <code>solid</code>, <code>dashed</code>, <code>dotted</code>, <code>double</code>, <code>groove</code>, <code>ridge</code>, <code>inset</code>, and <code>outset</code>. </p>
<p>Just like <code>border-width</code>, <code>border-style</code> is a shorthand for <code>border-top-style</code>, <code>border-right-style</code>, <code>border-bottom-style</code> and <code>border-left-style</code>. So again, you can specify different values for the properties if you don’t want to use the shorthand. </p>
<h3 id="heading-css-border-color-property">CSS <code>border-color</code> property</h3>
<p>The <code>border-color</code> property lets you specify different colors for your border. You can specify this color with named, RGB, and HSL colors – there are no limits. </p>
<p>Black is the default color for this property. So if you don’t specify a value for it, black is automatically set as long as you have the border-width and border-style set to some values.</p>
<p>As it goes with <code>border-width</code> and <code>border-style</code>, you can also specify different colors on all the sides of the border. So, <code>border-color</code> is a shorthand for <code>border-top-color</code>, <code>border-right-color</code>, <code>border-bottom-color</code>, and <code>border-left-color</code>. </p>
<p>Below are snippets of code and their respective screenshots showing the three sub-properties of <code>border</code> in action:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"freecodecamp.png"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"freecodecamp-img"</span> /&gt;</span>
</code></pre>
<pre><code class="lang-css"><span class="hljs-selector-tag">img</span> {
      <span class="hljs-attribute">display</span>: block;
      <span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span> auto;
      <span class="hljs-attribute">margin-top</span>: <span class="hljs-number">1rem</span>;
    }

    <span class="hljs-selector-tag">img</span> {
      <span class="hljs-attribute">border-top-width</span>: <span class="hljs-number">2px</span>;
      <span class="hljs-attribute">border-right-width</span>: <span class="hljs-number">4px</span>;
      <span class="hljs-attribute">border-bottom-width</span>: <span class="hljs-number">6px</span>;
      <span class="hljs-attribute">border-left-width</span>: <span class="hljs-number">8px</span>;
      <span class="hljs-attribute">border-top-style</span>: solid;
      <span class="hljs-attribute">border-right-style</span>: dotted;
      <span class="hljs-attribute">border-bottom-style</span>: dashed;
      <span class="hljs-attribute">border-left-style</span>: groove;
      <span class="hljs-attribute">border-top-color</span>: <span class="hljs-number">#006100</span>;
      <span class="hljs-attribute">border-right-color</span>: <span class="hljs-number">#050116</span>;
      <span class="hljs-attribute">border-bottom-color</span>: <span class="hljs-number">#2ecc71</span>;
      <span class="hljs-attribute">border-left-color</span>: <span class="hljs-number">#3498db</span>;
    }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/ss1.png" alt="ss1" width="600" height="400" loading="lazy"></p>
<pre><code class="lang-css"><span class="hljs-selector-tag">img</span> {
      <span class="hljs-attribute">display</span>: block;
      <span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span> auto;
      <span class="hljs-attribute">margin-top</span>: <span class="hljs-number">1rem</span>;
    }

<span class="hljs-selector-tag">img</span> {
      <span class="hljs-attribute">border-width</span>: <span class="hljs-number">8px</span>;
      <span class="hljs-attribute">border-style</span>: solid;
      <span class="hljs-attribute">border-color</span>: <span class="hljs-number">#006100</span>;
    }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/ss2.png" alt="ss2" width="600" height="400" loading="lazy"></p>
<pre><code class="lang-css"> <span class="hljs-selector-tag">img</span> {
      <span class="hljs-attribute">border-width</span>: <span class="hljs-number">10px</span>;
      <span class="hljs-attribute">border-style</span>: outset;
      <span class="hljs-attribute">border-color</span>: <span class="hljs-number">#006100</span>;
    }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/ss3.png" alt="ss3" width="600" height="400" loading="lazy"></p>
<p>You can play around with the sub-properties to get a better understanding of how they work.</p>
<h3 id="heading-the-border-shorthand">The <code>border</code> shorthand</h3>
<p>We’ve applied the <code>border</code> sub-properties (<code>border-width</code>, <code>border-style</code>, and <code>border-color</code>) one by one, but they can be applied together with the <code>border</code> shorthand. </p>
<p>This shorthand is useful especially when you want all four sides to be the same like I have done below:</p>
<pre><code class="lang-css"><span class="hljs-selector-tag">img</span> {
      <span class="hljs-attribute">border</span>: <span class="hljs-number">2px</span> solid <span class="hljs-number">#006100</span>;
    }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/ss4.png" alt="ss4" width="600" height="400" loading="lazy"></p>
<h3 id="heading-css-border-radius-property">CSS <code>border-radius</code> property</h3>
<p>With <code>border-radius</code>, you can remove sharp edges from the borders in order to make them into rounded corners. I think this makes them more beautiful, too. </p>
<p>The value is specified in pixels (px), and percentage (%) too, depending on how you prefer it. </p>
<pre><code class="lang-css"><span class="hljs-selector-tag">img</span> {
      <span class="hljs-attribute">border</span>: <span class="hljs-number">2px</span> solid <span class="hljs-number">#006100</span>;
      <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">10px</span>;
    }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/ss5.png" alt="ss5" width="600" height="400" loading="lazy"></p>
<p>If you want to, you can also specify a different radius for the top, left, bottom and right edges of the border with <code>border-top-right-radius</code>, <code>border-top-left-radius</code>, <code>border-bottom-right-radius</code> and <code>border-bottom-left-radius</code>. This is because <code>border-radius</code> is also a shorthand for those four sub-properties.</p>
<p>We can apply some radii to our borders too:  </p>
<pre><code class="lang-css"><span class="hljs-selector-tag">img</span> {
      <span class="hljs-attribute">border</span>: <span class="hljs-number">2px</span> solid <span class="hljs-number">#006100</span>;
      <span class="hljs-attribute">border-top-right-radius</span>: <span class="hljs-number">10px</span>;
      <span class="hljs-attribute">border-top-left-radius</span>: <span class="hljs-number">30px</span>;
      <span class="hljs-attribute">border-bottom-right-radius</span>: <span class="hljs-number">50px</span>;
      <span class="hljs-attribute">border-bottom-left-radius</span>: <span class="hljs-number">100px</span>;
    }
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/08/ss6.png" alt="ss6" width="600" height="400" loading="lazy"></p>
<h2 id="heading-a-small-project-how-to-use-the-css-border-property-to-make-the-olympic-rings">A small project: How to Use the CSS <code>border</code> Property to Make the Olympic Rings</h2>
<p>We can take what we’ve learned about the <code>border</code> property and combine it with CSS Positioning and Flexbox to make the Olympic Rings.</p>
<pre><code class="lang-html">    <span class="hljs-tag">&lt;<span class="hljs-name">section</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"container"</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">section</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"top"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"red"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"black"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"blue"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span>

      <span class="hljs-tag">&lt;<span class="hljs-name">section</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"bottom"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"green"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"yellow"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span>
</code></pre>
<pre><code class="lang-css"><span class="hljs-selector-tag">div</span> {
      <span class="hljs-attribute">height</span>: <span class="hljs-number">12.5rem</span>;
      <span class="hljs-attribute">width</span>: <span class="hljs-number">12.5rem</span>;
      <span class="hljs-attribute">border</span>: <span class="hljs-number">12px</span> solid;
      <span class="hljs-attribute">border-radius</span>: <span class="hljs-number">50%</span>;
      <span class="hljs-attribute">margin</span>: <span class="hljs-number">1rem</span>;
    }

    <span class="hljs-selector-class">.blue</span> {
      <span class="hljs-attribute">color</span>: <span class="hljs-number">#3498db</span>;
    }

    <span class="hljs-selector-class">.black</span> {
      <span class="hljs-attribute">color</span>: black;
      <span class="hljs-attribute">position</span>: relative;
      <span class="hljs-attribute">z-index</span>: <span class="hljs-number">1000</span>;
    }

    <span class="hljs-selector-class">.red</span> {
      <span class="hljs-attribute">color</span>: <span class="hljs-number">#ca2e2e</span>;
    }

    <span class="hljs-selector-class">.yellow</span> {
      <span class="hljs-attribute">color</span>: <span class="hljs-number">#ffa600</span>;
    }

    <span class="hljs-selector-class">.green</span> {
      <span class="hljs-attribute">color</span>: <span class="hljs-number">#19a019</span>;
    }

    <span class="hljs-selector-class">.container</span> {
      <span class="hljs-attribute">display</span>: flex;
      <span class="hljs-attribute">align-items</span>: center;
      <span class="hljs-attribute">justify-content</span>: center;
      <span class="hljs-attribute">transform</span>: <span class="hljs-built_in">rotate</span>(<span class="hljs-number">90deg</span>);
    }

    <span class="hljs-selector-class">.bottom</span> {
      <span class="hljs-attribute">position</span>: relative;
      <span class="hljs-attribute">right</span>: <span class="hljs-number">8.125rem</span>;
    }

    <span class="hljs-keyword">@media</span> screen <span class="hljs-keyword">and</span> (<span class="hljs-attribute">max-width:</span> <span class="hljs-number">750px</span>) {
      <span class="hljs-selector-tag">div</span> {
        <span class="hljs-attribute">width</span>: <span class="hljs-number">130px</span>;
        <span class="hljs-attribute">height</span>: <span class="hljs-number">130px</span>;
      }

      <span class="hljs-selector-class">.bottom</span> {
        <span class="hljs-attribute">right</span>: <span class="hljs-number">7rem</span>;
      }
    }
</code></pre>
<p>So what's going on in this code?</p>
<p>The Olympic Rings have 5 circles – 3 at the top and 2 at the bottom – with colors blue, black, red, yellow, and green, respectively. </p>
<p>To make a circle with the border-radius property, we set the width and height to 12.5rem each, then the <code>border-radius</code> itself to 50%. This is how you make a circle with CSS. </p>
<p>We placed the top and bottom rings in a parent container, so we're able to place them one on top of each other with CSS Flexbox. But that didn’t complete the job, so we used the transform property of CSS animation to get it done.</p>
<p>Finally, we made some little tweaks with CSS Positioning to get the rings interlocked. </p>
<p>In the end, we get the result below: 
<img src="https://www.freecodecamp.org/news/content/images/2021/08/ss7.png" alt="ss7" width="600" height="400" loading="lazy"></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>I hope this tutorial helps you get up and running with the CSS <code>border</code> property so you can make effective use of it in your projects. </p>
<p>Thanks a lot for reading and have a good time.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is Tailwind CSS and How Can I Add it to my Website or React App? ]]>
                </title>
                <description>
                    <![CDATA[ CSS is a technology that can be your best or worst friend. While it's incredibly flexible and can produce what seems like magic, without the proper care and attention, it can become hard to manage like any other code.  How can Tailwind CSS help us to... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-tailwind-css-and-how-can-i-add-it-to-my-website-or-react-app/</link>
                <guid isPermaLink="false">66b8e39e0196ee8e3efce546</guid>
                
                    <category>
                        <![CDATA[ CSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS Framework ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS3 ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Developer Tools ]]>
                    </category>
                
                    <category>
                        <![CDATA[ framework ]]>
                    </category>
                
                    <category>
                        <![CDATA[ front end ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Front-end Development ]]>
                    </category>
                
                    <category>
                        <![CDATA[ frontend ]]>
                    </category>
                
                    <category>
                        <![CDATA[ HTML ]]>
                    </category>
                
                    <category>
                        <![CDATA[ PostCSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tailwind ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tools ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Colby Fayock ]]>
                </dc:creator>
                <pubDate>Tue, 19 May 2020 14:45:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/05/tailwind-1.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>CSS is a technology that can be your best or worst friend. While it's incredibly flexible and can produce what seems like magic, without the proper care and attention, it can become hard to manage like any other code. </p>
<p>How can Tailwind CSS help us to take control of our styles?</p>
<ul>
<li><a class="post-section-overview" href="#heading-what-is-tailwind">What is Tailwind?</a></li>
<li><a class="post-section-overview" href="#heading-so-what-makes-tailwind-great">So what makes Tailwind great?</a></li>
<li><a class="post-section-overview" href="#heading-part-1-adding-tailwind-css-to-a-static-html-page">Part 1: Adding Tailwind CSS to a static HTML page</a></li>
<li><a class="post-section-overview" href="#heading-part-2-adding-tailwind-css-to-a-react-app">Part 2: Adding Tailwind CSS to a React app</a></li>
</ul>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/7KeZcRMltP0" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
<h2 id="heading-what-is-tailwind">What is Tailwind?</h2>
<p><a target="_blank" href="https://tailwindcss.com/">Tailwind CSS</a> is a "utility-first" CSS framework that provides a deep catalog of CSS classes and tools that lets you easily get started styling your website or application.</p>
<p>The underlying goal is that as you're building your project, you don't need to deal with cascading styles and worrying about how to override that 10-selector pileup that's been haunting your app for the last 2 years.</p>
<h2 id="heading-so-what-makes-tailwind-great">So what makes Tailwind great?</h2>
<p>Taildwind's solution is to provide a wide variety of CSS classes that each have their own focused use. Instead of a class called <code>.btn</code> that is created with a bunch of CSS attributes directly, in Tailwind, you would either apply a bunch of classes like <code>bg-blue-500 py-2 px-4 rounded</code> to the button element or build a <code>.btn</code> class by <a target="_blank" href="https://tailwindcss.com/docs/functions-and-directives/#apply">applying</a> those utility class to that selector.</p>
<p>While Tailwind has a lot more going for it, we're going to focus on these basics for this tutorial, so let's dig in!</p>
<h2 id="heading-part-1-adding-tailwind-css-to-a-static-html-page">Part 1: Adding Tailwind CSS to a static HTML page</h2>
<p>We're going to start off by applying Tailwind CSS straight to a static HTML page. The hope is that by focusing on Tailwind and not the app, we can get a better understanding of what's actually happening with the framework.</p>
<h3 id="heading-step-1-creating-a-new-page">Step 1: Creating a new page</h3>
<p>You can get started by simply creating a new HTML file. For the content, you can use whatever you want, but I'm going to use <a target="_blank" href="http://fillerama.io/">fillerama.io</a> so the filler content is a bit more fun.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/html-page-with-content.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>New HTML page with content</em></p>
<p>If you want to simplify this step, you can just <a target="_blank" href="https://github.com/colbyfayock/my-tailwind-static/commit/c7db11899c9cd193cdd666fd228cfaefe75623f2#diff-eacf331f0ffc35d4b482f1d15a887d3b">copy the file I created</a> to get started.</p>
<p><a target="_blank" href="https://github.com/colbyfayock/my-tailwind-static/commit/c7db11899c9cd193cdd666fd228cfaefe75623f2">Follow along with the commit!</a></p>
<h3 id="heading-step-2-adding-tailwind-css-via-cdn">Step 2: Adding Tailwind CSS via CDN</h3>
<p>Tailwind typically recommends that you install through <a target="_blank" href="https://www.npmjs.com/package/tailwindcss">npm</a> to get the full functionality, but again, we're just trying to understand how this works first.</p>
<p>So let's add a link to the CDN file in the <code>&lt;head&gt;</code> of our document:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"stylesheet"</span>&gt;</span>
</code></pre>
<p>Once you save and reload the page, the first thing you'll notice is that all of the styles were stripped!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/html-page-tailwind-base.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>HTML page with the Tailwind CSS base</em></p>
<p>This is expected. Tailwind includes a set of <a target="_blank" href="https://tailwindcss.com/docs/preflight">preflight styles</a> to fix cross-browser inconsistencies. For one, they include the popular <a target="_blank" href="https://github.com/necolas/normalize.css/">normalize.css</a> which they build upon with their own styles.</p>
<p>But we're going to learn how to use Tailwind to add back our styles and set things up how we want!</p>
<p><a target="_blank" href="https://github.com/colbyfayock/my-tailwind-static/commit/b431b75cee0a03154a70b194b6dfcf028bc65942">Follow along with the commit!</a></p>
<h3 id="heading-step-3-using-tailwind-css-to-add-styles-to-your-page">Step 3: Using Tailwind CSS to add styles to your page</h3>
<p>Now that we have Tailwind installed, we've added the ability to make use of their huge library of utility classes that we'll now use to add styles back to our page.</p>
<p>Let's start off by adding some margin to all of our paragraphs (<code>&lt;p&gt;</code>) and our list elements (<code>&lt;ol&gt;</code>, <code>&lt;ul&gt;</code>). We can do this by adding the <code>.my-5</code> class to each element like so:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"my-5"</span>&gt;</span>
  Bender, quit destroying the universe! Yeah, I do that with my stupidness. I never loved you. Moving along…
  Belligerent and numerous.
<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
</code></pre>
<p>The class name follows a pattern that you'll notice with the rest of the utility classes – <code>.my-5</code> stands for margin (m) applied to the y-axis (y) with a value of 5 which in Tailwind's case, it uses <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units">rem</a>, so the value is 5rem.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/html-page-paragraph-styles.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>HTML page with basic paragraph styles</em></p>
<p>Next, let's make our headers look like actual headers. Starting with our <code>h1</code> tag, let's add:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-2xl font-bold mt-8 mb-5"</span>&gt;</span>
</code></pre>
<p>Here's what's happening:</p>
<ul>
<li><code>text-2xl</code>: set the text size (font-size) to 2xl. In Tailwind, that 2xl will equate to 1.5rem</li>
<li><code>font-bold</code>: set the weight of the text (font-weight) to bold</li>
<li><code>mt-8</code>: Similar to <code>my-5</code>, this will set the margin top (t) to 8rem</li>
<li><code>mb-5</code>: And this will set the margin bottom (b) to 5rem</li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/html-page-header-styles.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>HTML page with styled H1</em></p>
<p>With those classes added to the <code>h1</code>, let's apply those same exact classes to the rest of our header elements, but as we go down the list, reduce the size of the font size, so it will look like:</p>
<ul>
<li>h2: <code>text-xl</code></li>
<li>h3: <code>text-lg</code></li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/html-page-all-headers-style.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>HTML page with all headers styled</em></p>
<p>Now let's make our list elements look like lists. Starting with our unordered list (<code>&lt;ul&gt;</code>), let's add these classes:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">ul</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"list-disc list-inside my-5 pl-2"</span>&gt;</span>
</code></pre>
<p>Here's what we're adding:</p>
<ul>
<li><code>list-disc</code>: set the list-style-stype to disc (the markers on each line item)</li>
<li><code>list-inside</code>: sets the position of the list markers using  relative to the list items and the list itself with list-style-position to inside</li>
<li><code>my-5</code>: set the margin of the y axis to 5rem</li>
<li><code>pl-2</code>: set the left padding to 2rem</li>
</ul>
<p>Then we can apply the exact same classes to our ordered list (<code>&lt;ol&gt;</code>), except instead of <code>list-disc</code>, we want to change our style type to <code>list-decimal</code>, so that we can see numbers given it's an ordered list.</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">ol</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"list-decimal list-inside my-5 pl-2"</span>&gt;</span>
</code></pre>
<p>And we have our lists!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/html-page-styled-lists.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>HTML page with styled lists</em></p>
<p>Finally, let's make our content a little easier to read by setting a max width and centering the content. On the <code>&lt;body&gt;</code> tag, add the following:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">body</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"max-w-4xl mx-auto"</span>&gt;</span>
</code></pre>
<p>/Note: Typically you wouldn't want to apply these classes to the <code>&lt;body&gt;</code> itself, rather, you can wrap all of your content with a <code>&lt;main&gt;</code> tag, but since we're just trying to get an idea of how this works, we'll roll with this. Feel free to add the <code>&lt;main&gt;</code> tag with those classes instead if you prefer!/</p>
<p>And with that, we have our page!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/html-page-content-centered.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>HTML page with centered content</em></p>
<p><a target="_blank" href="https://github.com/colbyfayock/my-tailwind-static/commit/06fd719c98d17e2242b61ec2ab7034436c1c2ba6">Follow along with the commit!</a></p>
<h3 id="heading-step-4-adding-a-button-and-other-components">Step 4: Adding a button and other components</h3>
<p>For the last part of our static example, let's add a button.</p>
<p>The trick with Tailwind, is they intentionally don't provide pre-baked component classes with the idea being that likely people would need to override these components anyways to make them look how they wanted.</p>
<p>So that means, we're going to have to create our own using the utility classes!</p>
<p>First, let's add a new button. Somewhere on the page, add the following snippet. I'm going to add it right below the first paragraph (<code>&lt;p&gt;</code>) tag:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">button</span>&gt;</span>Party with Slurm!<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
</code></pre>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/html-page-unstyled-button.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>HTML page with unstyled button</em></p>
<p>You'll notice just like all of the other elements, that it's unstyled, however, if you try clicking it, you'll notice it still has the click actions. So let's make it look like a button.</p>
<p>Let's add the following classes:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"text-white font-bold bg-purple-700 hover:bg-purple-800 py-2 px-4 rounded"</span>&gt;</span>
  Party with Slurm!
<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
</code></pre>
<p>Here's a breakdown of what's happening:</p>
<ul>
<li><code>text-white</code>: we're setting our text color to white</li>
<li><code>font-bold</code>: set the weight of the text to bold (font-weight)</li>
<li><code>bg-purple-700</code>: set the background color of the button to purple with a shade of 700. The 700 is relative to the other colors defined as purple, you can find these values on their <a target="_blank" href="https://tailwindcss.com/docs/customizing-colors#default-color-palette">palette documentation page</a></li>
<li><code>hover:bg-purple-800</code>: when someone hovers over the button, set the background color to purple shade 800. Tailwind provides these helper classes that allow us to easily define interactive stiles with things like <a target="_blank" href="https://tailwindcss.com/course/hover-focus-and-active-styles/">hover, focus, and active modifiers</a></li>
<li><code>py-2</code>: set the padding of the y-axis to 2rem</li>
<li><code>px-4</code>: set the padding of the  x-axis to 4rem</li>
<li><code>rounded</code>: round the corners of the element by setting the border radius. With tailwind, it sets the border-radius value to .25rem</li>
</ul>
<p>And with all of that, we have our button!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/html-page-styled-button.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>HTML page with a styled button</em></p>
<p>You can apply this methodology to any other component that you'd like to build. Though it's a manual process, we'll find out how we can make this process easier when building in more dynamic projects like those based on React.</p>
<p><a target="_blank" href="https://github.com/colbyfayock/my-tailwind-static/commit/09312336dce316a75e8007d6c935133490f16c25">Follow along with the commit!</a></p>
<h2 id="heading-part-2-adding-tailwind-css-to-a-react-app">Part 2: Adding Tailwind CSS to a React app</h2>
<p>For more of a real-world use case, we're going to add Tailwind CSS to an app created with <a target="_blank" href="https://reactjs.org/docs/create-a-new-react-app.html">Create React App</a>.</p>
<p>First, we'll walk through the steps you need to take to add tailwind to your project using a fresh install of Create React App, then we'll use our content from our last example to recreate it in React.</p>
<h3 id="heading-step-1-spinning-up-a-new-react-app">Step 1: Spinning up a new React app</h3>
<p>I'm not going to detail this step out too much. The gist is we'll bootstrap a new React app using Create React App.</p>
<p>To get started, you can follow along <a target="_blank" href="https://reactjs.org/docs/create-a-new-react-app.html">with the directions</a> from the official React documentation:</p>
<p><a target="_blank" href="https://reactjs.org/docs/create-a-new-react-app.html">https://reactjs.org/docs/create-a-new-react-app.html</a></p>
<p>And once you start your development server, you should now see an app!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/create-react-app-starting-page.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Create React App starting page</em></p>
<p>Finally, let's migrate all of our old content to our app. To do this, copy everything inside of the <code>&lt;body&gt;</code> tag of our static example and paste it inside of the wrapper <code>&lt;div className="App"&gt;</code> in the new React project.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/code-migrating-content.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Migrating code to React app</em></p>
<p>Next, change all <code>class="</code> attributes from the content we pasted in to <code>className="</code> so that it's using proper React attributes:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/code-fixing-class-attribute.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Fixing class attribute in content</em></p>
<p>And lastly, replace the className <code>App</code> on our wrapper <code>&lt;div&gt;</code> to the classes we used on our static <code>&lt;body&gt;</code>.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/code-wrapper-styles.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Adding wrapper styles to the app</em></p>
<p>Once you save your changes and spin back up your server, it will look deceivingly okay.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/react-app-basic-content.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>React app with basic content</em></p>
<p>React includes some basic styles itself, so while it looks okay, we're not actually using Tailwind yet. So let's get started by installing it!</p>
<p><a target="_blank" href="https://github.com/colbyfayock/my-tailwind-dynamic/commit/57993883c77739f71072bcc02ed2398543efc2fd">Follow along with the commit!</a></p>
<h3 id="heading-step-2-installing-tailwind-in-your-react-app">Step 2: Installing Tailwind in your React app</h3>
<p>There are a few steps we'll need to go through in order to get Tailwind up and running on our app. Make sure you follow these steps carefully to ensure it's properly configured.</p>
<p>First, let's add our dependencies:</p>
<pre><code>yarn add tailwindcss postcss-cli autoprefixer
# or
npm install tailwindcss postcss-cli autoprefixer
</code></pre><p><a target="_blank" href="https://tailwindcss.com/docs/installation#4-process-your-css-with-tailwind">Per Tailwind's documentation</a>, we need to be able to process our styles so that they can be properly added to our pipeline. So in the above, we're adding:</p>
<ul>
<li><a target="_blank" href="https://tailwindcss.com/">tailwindcss</a>: the core Tailwind package</li>
<li><a target="_blank" href="https://github.com/postcss/postcss">postcss-cli</a>: Create React App already uses postcss, but we need to configure Tailwind to be part of that build process and run it's own processing</li>
<li><a target="_blank" href="https://github.com/postcss/autoprefixer">autoprefixer</a>: Tailwind doesn't include vendor prefixes, so we want to add autoprefixer to handle this for us. This runs as part of our postcss configuration</li>
</ul>
<p>We're also going to add two dev dependencies that make it easier to work with our code:</p>
<pre><code>yarn add concurrently chokidar-cli -D
# or
npm install concurrently chokidar-cli --save-dev
</code></pre><ul>
<li><a target="_blank" href="https://github.com/kimmobrunfeldt/concurrently">concurrently</a>: a package that lets us set up the ability to run multiple commands at once. This is helpful since we'll need to watch both the styles and React app itself.</li>
<li><a target="_blank" href="https://github.com/kimmobrunfeldt/chokidar-cli">chokidar-cli</a>: let's us watch files and run a command when changed. We'll use this to watch our CSS file and run the build process of the CSS on cahnge</li>
</ul>
<p>Next, let's configure postcss, so create a new file in the root of your project called <code>postcss.config.js</code> and include the following:</p>
<pre><code class="lang-js"><span class="hljs-comment">// Inside postcss.config.js</span>
<span class="hljs-built_in">module</span>.exports = {
    <span class="hljs-attr">plugins</span>: [
        <span class="hljs-built_in">require</span>(<span class="hljs-string">'tailwindcss'</span>),
        <span class="hljs-built_in">require</span>(<span class="hljs-string">'autoprefixer'</span>)
    ],
};
</code></pre>
<p>This will add the Tailwindcss and Autoprefixer plugins to our postcss config.</p>
<p>With our configuration, we need to include it as part of the build and watch processes. Inside <code>package.json</code>, add the following to definitions to your <code>scripts</code> property:</p>
<pre><code class="lang-json"><span class="hljs-string">"build:css"</span>: <span class="hljs-string">"tailwind build src/App.css -o src/index.css"</span>,
<span class="hljs-string">"watch:css"</span>: <span class="hljs-string">"chokidar 'src/App.css' -c 'npm run build:css'"</span>,
</code></pre>
<p>Additionally, modify the <code>start</code> and <code>build</code> scripts to now include those commands:</p>
<pre><code class="lang-json"><span class="hljs-string">"start"</span>: <span class="hljs-string">"concurrently -n Tailwind,React 'npm run watch:css' 'react-scripts start'"</span>,
<span class="hljs-string">"build"</span>: <span class="hljs-string">"npm run build:css &amp;&amp; react-scripts build"</span>,
</code></pre>
<p>With our configuration ready to go, let's try our styles back to where they were when we left off from the static example.</p>
<p>Inside the <code>App.css</code> file, replace the entire content with:</p>
<pre><code class="lang-css"><span class="hljs-keyword">@tailwind</span> base;
<span class="hljs-keyword">@tailwind</span> components;
<span class="hljs-keyword">@tailwind</span> utilities;
</code></pre>
<p>This is going to import Tailwind's base styles, components, and utility classes that allow Tailwind to work as you would expect it to.</p>
<p>We can also remove the <code>App.css</code> import from our <code>App.js</code> file because it's now getting injected directly into our <code>index.css</code> file. So remove this line:</p>
<pre><code class="lang-js"><span class="hljs-keyword">import</span> <span class="hljs-string">'./App.css'</span>;
</code></pre>
<p>Once you're done, you can start back up your development server! If it was already started, make sure to restart it so all of the configuration changes take effect.</p>
<p>And now the page should look exactly like it did in our static example!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/react-app-with-styled-content.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>React app with content styled</em></p>
<p><a target="_blank" href="https://github.com/colbyfayock/my-tailwind-dynamic/commit/5f50cc218ef58f469dad7f09bdad31f36b58a896">Follow along with the commit!</a></p>
<h3 id="heading-step-3-creating-a-new-button-component-class-with-tailwind">Step 3: Creating a new button component class with Tailwind</h3>
<p>Tailwind doesn't ship with prebaked component classes, but it does make it easy to create them!</p>
<p>We're going to use our button that we already created as an example of creating a new component. We'll create a new class <code>btn</code> as well as a color modifier <code>btn-purple</code> to accomplish this.</p>
<p>The first thing we'll want to do is open up our App.css file where we'll create our new class. Inside that file, let's add:</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.btn</span> {
  @apply font-bold py-2 px-4 rounded;
}
</code></pre>
<p>If you remember from our HTML, we're already including those same classes to our <code>&lt;button&gt;</code> element.  Tailwind let's us "apply" or include the styles that make up these utility classes to another class, in this case, the <code>.btn</code> class.</p>
<p>And now that we're creating that class, let's apply it to our button:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"btn text-white bg-purple-700 hover:bg-purple-800"</span>&gt;</span>
  Party with Slurm!
<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
</code></pre>
<p>And if we open up our page, we can see our button still looks the same. If we inspect the element, we can see our new <code>.btn</code> class generated with those styles.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/react-tailwind-button-class.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>.btn class in a React app with Tailwind</em></p>
<p>Next, let's create a color modifier. Similar to what we just did, we're going to add the following rules:</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.btn-purple</span> {
  @apply bg-purple-700 text-white;
}

<span class="hljs-selector-class">.btn-purple</span><span class="hljs-selector-pseudo">:hover</span> {
  @apply bg-purple-800;
}
</code></pre>
<p>Here, we're adding our background color and our text color to our button class. We're also applying a darker button color when someone hovers over the button.</p>
<p>We'll also want to update our HTML button to include our new class and remove the ones we just applied:</p>
<pre><code class="lang-html"><span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">className</span>=<span class="hljs-string">"btn btn-purple"</span>&gt;</span>
  Party with Slurm!
<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
</code></pre>
<p>And with that change, we can still see that nothing has changed and we have our new button class!</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/react-tailwind-styled-button.jpg" alt="Image" width="600" height="400" loading="lazy">
<em>Styled button in React with Tailwind</em></p>
<p><a target="_blank" href="https://github.com/colbyfayock/my-tailwind-dynamic/commit/7a76e8a4583b0a4c523ea902d73e889c7b86f437">Follow along with the commit!</a></p>
<h2 id="heading-applying-these-concepts-to-more-components">Applying these concepts to more components</h2>
<p>Through this walkthrough, we learned how to create a new component class using the Tailwind apply directive. This allowed us to create reusable classes that represent a component like a button.</p>
<p>We can apply this to any number of components in our design system. For instance, if we wanted to always show our lists the way we set them up here, we could create a <code>.list-ul</code> class that represented an unordered list with the Tailwind utilities <code>list-disc list-inside my-5 pl-2</code> applied.</p>
<h2 id="heading-what-tips-and-tricks-do-you-like-to-use-with-tailwind">What tips and tricks do you like to use with Tailwind?</h2>
<p>Share with me on <a target="_blank" href="https://twitter.com/colbyfayock">Twitter</a>!</p>
<div id="colbyfayock-author-card">
  <p>
    <a href="https://twitter.com/colbyfayock">
      <img src="https://res.cloudinary.com/fay/image/upload/w_2000,h_400,c_fill,q_auto,f_auto/w_1020,c_fit,co_rgb:007079,g_north_west,x_635,y_70,l_text:Source%20Sans%20Pro_64_line_spacing_-10_bold:Colby%20Fayock/w_1020,c_fit,co_rgb:383f43,g_west,x_635,y_6,l_text:Source%20Sans%20Pro_44_line_spacing_0_normal:Follow%20me%20for%20more%20JavaScript%252c%20UX%252c%20and%20other%20interesting%20things!/w_1020,c_fit,co_rgb:007079,g_south_west,x_635,y_70,l_text:Source%20Sans%20Pro_40_line_spacing_-10_semibold:colbyfayock.com/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_68,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_145,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_222,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/w_300,c_fit,co_rgb:7c848a,g_north_west,x_1725,y_295,l_text:Source%20Sans%20Pro_40_line_spacing_-10_normal:colbyfayock/v1/social-footer-card" alt="Follow me for more Javascript, UX, and other interesting things!" width="2000" height="400" loading="lazy">
    </a>
  </p>
  <ul>
    <li>
      <a href="https://twitter.com/colbyfayock">? Follow Me On Twitter</a>
    </li>
    <li>
      <a href="https://youtube.com/colbyfayock">?️ Subscribe To My Youtube</a>
    </li>
    <li>
      <a href="https://www.colbyfayock.com/newsletter/">✉️ Sign Up For My Newsletter</a>
    </li>
  </ul>
</div>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ CSS Frameworks ]]>
                </title>
                <description>
                    <![CDATA[ Bootstrap Bootstrap is a very popular CSS framework that's widely used. Check out this article for a more in-depth guide. Semantic UI Semantic UI is one of the most popular CSS framework for developing responsive, mobile first projects for the web. G... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/css-frameworks/</link>
                <guid isPermaLink="false">66c3484ac8f6b2d81069b322</guid>
                
                    <category>
                        <![CDATA[ CSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS Framework ]]>
                    </category>
                
                    <category>
                        <![CDATA[ toothbrush ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sun, 02 Feb 2020 00:29:00 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9c9cdc740569d1a4ca3499.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <h2 id="heading-bootstrap">Bootstrap</h2>
<p>Bootstrap is a very popular CSS framework that's widely used. Check out <a target="_blank" href="https://guide.freecodecamp.org/bootstrap/">this article</a> for a more in-depth guide.</p>
<h1 id="heading-semantic-ui"><strong>Semantic UI</strong></h1>
<p>Semantic UI is one of the most popular CSS framework for developing responsive, mobile first projects for the web.</p>
<h3 id="heading-getting-started">Getting Started</h3>
<p>Here is a simple HTML template which includes the latest compiled and minified CSS and Javascript for the Semantic UI library. We have used a CDN in this example, but you can checkout other ways of installing Semantic UI <a target="_blank" href="https://semantic-ui.com/introduction/getting-started.html">here</a>.</p>
<pre><code class="lang-html">    <span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en"</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"utf-8"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"viewport"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"width=device-width, initial-scale=1"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Semantic UI Template<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"stylesheet"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/semantic-ui/2.2.13/semantic.min.css"</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Hello World<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
        <span class="hljs-comment">&lt;!-- Add all HTML Code here --&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/semantic-ui/2.2.13/semantic.min.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<h3 id="heading-learning-resources">Learning Resources</h3>
<ul>
<li>The official documentation for Semantic UI is available <a target="_blank" href="https://semantic-ui.com/introduction/getting-started.html">here</a>.</li>
<li>Checkout Semantic UI’s open source GitHub repository <a target="_blank" href="https://github.com/Semantic-Org/Semantic-UI">here</a>.</li>
</ul>
<h1 id="heading-skeleton"><strong>Skeleton</strong></h1>
<p>Skeleton is a dead simple boilerplate to kickstart any responsive project.</p>
<h3 id="heading-getting-started-1">Getting Started</h3>
<p>Here is a simple HTML template which includes the latest compiled and minified CSS for the Skeleton library.</p>
<pre><code class="lang-html">    <span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en"</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"utf-8"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"viewport"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"width=device-width, initial-scale=1"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Skeleton Template<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"//fonts.googleapis.com/css?family=Raleway:400,300,600"</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"stylesheet"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text/css"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"stylesheet"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdnjs.cloudflare.com/ajax/libs/normalize/4.1.1/normalize.min.css"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"stylesheet"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css"</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Hello World<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
        <span class="hljs-comment">&lt;!-- Add all HTML Code here --&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<p><strong>JSBin Demo</strong></p>
<p>We have used a CDN in this example, but you can checkout other ways of installing Skeleton <a target="_blank" href="https://github.com/dhg/Skeleton#getting-started">here</a>.</p>
<h3 id="heading-learning-resources-1">Learning Resources</h3>
<p><a target="_blank" href="http://getskeleton.com/#grid"><strong><code>Official Documentation</code></strong></a> of Skeleton.</p>
<ul>
<li>Checkout Skeleton’s open source GitHub repository <a target="_blank" href="https://github.com/dhg/Skeleton">here</a>.</li>
<li><a target="_blank" href="http://getskeleton.com/#examples">Here</a> are some examples of how Skeleton was used on different websites.</li>
</ul>
<h1 id="heading-materialize"><strong>Materialize</strong></h1>
<p>Materialize is a Responsive CSS framework based on Google’s <a target="_blank" href="https://design.google.com/spec/">Material Design</a> Language.</p>
<h3 id="heading-getting-started-2">Getting Started</h3>
<p>Here is a simple HTML template which includes the latest compiled and minified CSS and Javascript for the Materialize library.</p>
<pre><code class="lang-html">    <span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">html</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
      <span class="hljs-comment">&lt;!--Import Google Icon Font--&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://fonts.googleapis.com/icon?family=Material+Icons"</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"stylesheet"</span>&gt;</span>
      <span class="hljs-comment">&lt;!--Import materialize.css--&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"stylesheet"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css"</span>&gt;</span>

      <span class="hljs-comment">&lt;!--Let browser know website is optimized for mobile--&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"viewport"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"width=device-width, initial-scale=1.0"</span>/&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>

    <span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Hello World!<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
      <span class="hljs-comment">&lt;!--Import jQuery before materialize.js--&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"text/javascript"</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://code.jquery.com/jquery-3.2.1.min.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<p>We have used a CDN in this example, but you can checkout other ways of installing Materialize <a target="_blank" href="http://materializecss.com/getting-started">here</a>.</p>
<h3 id="heading-learning-resources-2">Learning Resources</h3>
<ul>
<li>The official documentation for Materialize is available <a target="_blank" href="https://guide.freecodecamp.org/css/css-frameworks/css-framework-materialize/www.materializecss.com/">here</a>.</li>
<li>Checkout Materialize’s open source GitHub repository <a target="_blank" href="https://github.com/Dogfalo/materialize">here</a>.</li>
<li><a target="_blank" href="https://scotch.io/tutorials/make-material-design-websites-with-the-materialize-css-framework">Here</a> is a handy tutorial on using Materialize.</li>
</ul>
<h2 id="heading-uikit"><strong>UIKit</strong></h2>
<p>UIKit is A lightweight and modular front-end framework for developing fast and powerful web interfaces.</p>
<h3 id="heading-getting-started-3"><strong>Getting Started</strong></h3>
<p>Here is a simple HTML template which includes the latest compiled and minified CSS for the UIKit library.</p>
<pre><code class="lang-html"><span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-name">html</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"stylesheet"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"css/uikit.min.css"</span> /&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"js/jquery.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"js/uikit.min.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"js/uikit-icons.min.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<p>We have used a CDN in this example, but you can checkout other ways of installing UIKit <a target="_blank" href="https://getuikit.com/docs/introduction">here</a>.</p>
<h3 id="heading-learning-resources-3"><strong>Learning Resources</strong></h3>
<ul>
<li>The official documentation for UIKit is available <a target="_blank" href="https://getuikit.com/docs/introduction">here</a>.</li>
<li>Checkout UIKit’s open source GitHub repository <a target="_blank" href="https://github.com/uikit/uikit">here</a>.</li>
</ul>
<h1 id="heading-foundation"><strong>Foundation</strong></h1>
<p><a target="_blank" href="http://foundation.zurb.com/">Foundation</a> is an open-source, mobile first CSS framework created by <a target="_blank" href="https://zurb.com/">Zurb</a>.</p>
<h3 id="heading-getting-started-4">Getting Started</h3>
<p>Here is a simple HTML template which includes the latest compiled and minified CSS and Javascript for the Foundation library.</p>
<pre><code class="lang-html">    <span class="hljs-meta">&lt;!DOCTYPE <span class="hljs-meta-keyword">html</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">html</span> <span class="hljs-attr">lang</span>=<span class="hljs-string">"en"</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">charset</span>=<span class="hljs-string">"utf-8"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">meta</span> <span class="hljs-attr">name</span>=<span class="hljs-string">"viewport"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"width=device-width, initial-scale=1"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>Foundation Template<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">link</span> <span class="hljs-attr">rel</span>=<span class="hljs-string">"stylesheet"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/foundation/6.2.1/foundation.min.css"</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Hello World<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
        <span class="hljs-comment">&lt;!-- Add all HTML Code here --&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/foundation/6.2.1/foundation.min.js"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span>
</code></pre>
<p>This example makes use of a CDN that loads the default settings. If you’d like to customize the grid layout, change the colors or add and remove components you can do so on the Foundation <a target="_blank" href="http://foundation.zurb.com/sites/download/">download</a> page.</p>
<h3 id="heading-learning-resources-4">Learning Resources</h3>
<ol>
<li><a target="_blank" href="http://foundation.zurb.com/sites/docs/">Foundation Documentation</a></li>
<li><a target="_blank" href="https://github.com/zurb/foundation-sites">List of Foundation Tutorials</a></li>
<li><a target="_blank" href="http://foundation.zurb.com/learn/tutorials.html">Foundation Source Files on GitHub</a></li>
<li><a target="_blank" href="https://www.youtube.com/playlist?list=PLqGj3iMvMa4LJo_lBMTJwAlQRElulSeL8">DevTips YouTube Series on Foundation Grid</a></li>
</ol>
<h2 id="heading-other-info-on-css-frameworks">Other info on CSS frameworks:</h2>
<ul>
<li><a target="_blank" href="https://www.freecodecamp.org/news/learn-bulma-in-5-minutes-ec5188c53e83/">Bulma</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/learn-the-bootstrap-css-framework-by-creating-a-custom-admin-theme/">Bootstrap</a></li>
<li><a target="_blank" href="https://www.freecodecamp.org/news/the-best-bootstrap-examples/">Best bootstrap examples</a></li>
</ul>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
