<?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[ Bulma - 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[ Bulma - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Sun, 24 May 2026 16:31:15 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/bulma/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ Up & Going with Nuxt.js, Bulma and  Sass ]]>
                </title>
                <description>
                    <![CDATA[ By Eduardo Vedes TL;DR: Overcome Nuxt.js, Bulma and Sass shenanigans with this quick article to help you start developing your next App in less than 10 minutes. Hi everyone ❤️! Few days ago I found myself struggling a bit to put Nuxt.js, Bulma and Sa... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/up-goind-with-nuxt-js-bulma-and-sass/</link>
                <guid isPermaLink="false">66d45f0b3a8352b6c5a2aa5b</guid>
                
                    <category>
                        <![CDATA[ 100DaysOfCode ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Bulma ]]>
                    </category>
                
                    <category>
                        <![CDATA[ freeCodeCamp.org ]]>
                    </category>
                
                    <category>
                        <![CDATA[ JavaScript ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Nuxt.js ]]>
                    </category>
                
                    <category>
                        <![CDATA[ General Programming ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Sass ]]>
                    </category>
                
                    <category>
                        <![CDATA[ vue ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Sat, 15 Jun 2019 11:09:27 +0000</pubDate>
                <media:content url="https://cdn-media-2.freecodecamp.org/w1280/5f9ca202740569d1a4ca51f3.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Eduardo Vedes</p>
<p><strong>TL;DR: Overcome Nuxt.js, Bulma and Sass shenanigans with this quick article to help you start developing your next App in less than 10 minutes.</strong></p>
<p>Hi everyone ❤️! Few days ago I found myself struggling a bit to put <strong>Nuxt.js</strong>, <strong>Bulma</strong> and <strong>Sass</strong> to work correctly and the info I found on google didn't help too much. </p>
<p>Most of the configurations I found were not working, because they were outdated or didn't explain quite well how to do it. So I deep dived a little bit on this subject and decided to write an article to help you do the same in less than 10 minutes.</p>
<p>Let's have some fun and get our hands dirty while grokking a few concepts needed to do this.</p>
<h2 id="heading-1-scaffolding-nuxtjs">1. Scaffolding Nuxt.js</h2>
<p>Nowadays, to get started quickly with Nuxt.js we use a scaffolding tool called <strong><a target="_blank" href="https://github.com/nuxt/create-nuxt-app">create-nuxt-app</a></strong>. Please make sure you have <strong><a target="_blank" href="https://www.npmjs.com/package/npx">npx</a></strong> installed on your machine.</p>
<p>Let's open a terminal and do: <code>npx create-nuxt-app nuxt-bulma-sass</code>, where <code>nuxt-bulma-sass</code> is the name of the project we're scaffolding for the purpose of this article.</p>
<p><strong>create-nuxt-app</strong> will ask you some questions before creating the scaffold. For the purpose of this article I've chosen the following setup:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/06/bulma2.png" alt="Image" width="600" height="400" loading="lazy">
<em>create-nuxt-app init questions</em></p>
<p>So, the next step will be to change directory into our project folder:</p>
<p><code>cd nuxt-bulma-sass</code></p>
<p>and launch the project with: <code>yarn run dev</code>. (you can also use npm if you like it)</p>
<p>At this point we have our project running:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/06/bulma3.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>And if we open our browser on localhost:3000 we'll be getting this screen:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/06/Screen-Shot-2019-06-14-at-09.29.05.png" alt="Image" width="600" height="400" loading="lazy">
<em>localhost:3000 pages/index.vue</em></p>
<p>So at this point we have the pages/index.vue on the screen, which is the first page to be rendered in your project by default.</p>
<p>Let's replace the content of this file by the following one:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/06/carbon1.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>If we inspect our page in the browser we see we got <strong>bulma</strong> installed because section is formatted according to it.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/06/Screen-Shot-2019-06-14-at-09.45.03.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Easy peasy lemon squeezy.</p>
<p>Let's add a class and choose some colors:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/06/carbon-2.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/06/Screen-Shot-2019-06-14-at-09.47.55.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>What if we want to nest .<em>hello-nuxt</em> inside .<em>edo-theme</em>? We're going to need SASS to be able to do it.</p>
<h2 id="heading-2-adding-sass">2. Adding Sass</h2>
<p>So, to add Sass to our project we'll need to stop our running app (Ctrl+c) and do the following:</p>
<p><code>yarn add node-sass sass-loader --dev</code></p>
<p>These are the two packages needed as dev-dependencies to be able to have Sass in our boilerplate.</p>
<p>Note that we're adding it as a dev dependency because we only need it while developing and at build time. After that <strong>Sass</strong> is transformed into <strong>CSS</strong> and we don't need it anymore.</p>
<p>Let's sneak peek my package.json for you to check it:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/06/Screen-Shot-2019-06-14-at-09.57.38.png" alt="Image" width="600" height="400" loading="lazy">
<em>package.json with sass added to the project</em></p>
<p>Okay everyone ❤️, at this point we're able to nest the classes we wanted to.</p>
<p>Let's run our boilerplate again: <code>yarn run dev</code> and do the tweaks needed ?</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/06/carbon--1-.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/06/Screen-Shot-2019-06-14-at-10.05.23.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Noice! We already did a lot today! Go grab a coffee ☕, I'll wait for you here ?</p>
<p>Okay, let's abstract things a bit and create this file <em>~/assets/scss/main.scss</em> and put there some classes and variables:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/06/carbon-1.png" alt="Image" width="600" height="400" loading="lazy">
<em>new ~/assets/scss/main.scss</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2019/06/carbon--1--1.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>Nice! It's working!</p>
<p>Now we have two problems: </p>
<ol>
<li>We need to import main.scss into each one of our pages/components, which is not nice. We want to import it only once and have it available in all our </li></ol> ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Free Course: Level Up ? With Bulma CSS ]]>
                </title>
                <description>
                    <![CDATA[ By ZAYDEK KAMEHAMEHAAAA ? Free Course: Level Up ? With Bulma CSS The best CSS framework since Bootstrap Before I get to the article, I just want to share that I’m building a product, and I would love to collect some data about how to better serve web... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/free-course-level-up-with-bulma-css-d82dcb4b980a/</link>
                <guid isPermaLink="false">66c34abe0f58901a62091781</guid>
                
                    <category>
                        <![CDATA[ Bulma ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Fri, 11 May 2018 15:24:26 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*4urWdQBOzdIhWfSmcaSfhg.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By ZAYDEK</p>
<h4 id="heading-kamehamehaaaa">KAMEHAMEHAAAA ?</h4>
<h1 id="heading-free-course-level-up-with-bulma-css">Free Course: Level Up ? With Bulma CSS</h1>
<h4 id="heading-the-best-css-framework-since-bootstrap">The best CSS framework since Bootstrap</h4>
<p>Before I get to the article, I just want to share that I’m building a product, and I would love to collect some data about how to better serve web developers. I created a <a target="_blank" href="https://twitter.com/username_ZAYDEK/status/1103914471267790854">short questionnaire</a> to check out before or after reading this article. Please check it out — thanks! And now, back to our regular scheduled programming.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*4urWdQBOzdIhWfSmcaSfhg.png" alt="Image" width="800" height="521" loading="lazy">
_The OG Bulma. [→](http://dragonball.wikia.com/wiki/Bulma" rel="noopener" target="<em>blank" title=")</em></p>
<h3 id="heading-meet-bulma-css-free-course-herehttpsscrimbacomggbulma">Meet Bulma CSS! Free course ? h<a target="_blank" href="https://scrimba.com/g/gbulma">ere</a></h3>
<p>Apart from being the second longest-standing character in Dragon Ball Z, <a target="_blank" href="https://bulma.io/">Bulma</a> is a modern CSS framework based on Flexbox from Jeremy Thomas <a target="_blank" href="https://jgthms.com/">@jgthms</a>. And Bulma is gaining adoption fast with <a target="_blank" href="https://github.com/jgthms/bulma/">150K+ downloads</a> a month and <a target="_blank" href="https://github.com/jgthms/bulma">26K+ stars</a> on GitHub. OK…tell me more. ?</p>
<p>With Bulma, we can create beautiful and responsive websites with ease. Jeremy designed Bulma as a reusable set of <a target="_blank" href="http://placeholder">Sass</a> patterns to kickstart new projects. Don’t know <em>Sass</em>? Sass <em>compiles</em> to CSS. And once <a target="_blank" href="https://en.wikipedia.org/wiki/CSS_flex-box_layout">Flexbox</a> became standardized, Jeremy used it to power what we now know as Bulma.</p>
<p>In this article, I detail <em>how</em> Bulma works and <em>what</em> we can build with it.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*YUa4liSlBUoldpJGt0ovtg.png" alt="Image" width="800" height="500" loading="lazy"></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*4NZIFhHJqCZPErX-b1hxJQ.png" alt="Image" width="800" height="500" loading="lazy"></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*Ejl2VJMpj-2sKbSMN4cgyw.png" alt="Image" width="800" height="500" loading="lazy">
_Want to learn how to <em>build</em> this 3D graphic? [Let me know!](http://bit.do/subscribe-d82dcb4b980a" rel="noopener" target="<em>blank" title=")</em></p>
<h3 id="heading-i-also-taught-bulma-css-on-scrimba-where-we-build-these-websites-its-free-click-here-to-enrollhttpsscrimbacomggbulma">I also taught Bulma CSS on Scrimba, where we build these websites. It’s free — <a target="_blank" href="https://scrimba.com/g/gbulma">click here to enroll</a>! ?</h3>
<h4 id="heading-scrimbacomhttpsscrimbacomggbulma-is-a-platform-for-front-end-development-where-websites-are-recorded-as-events-not-videos-and-can-be-edited"><a target="_blank" href="https://scrimba.com/g/gbulma">Scrimba.com</a> is a platform for front-end development, where websites are recorded as events — not videos — and can be edited. ?</h4>
<h3 id="heading-how-does-bulma-work">How does Bulma work?</h3>
<p>Bulma is <a target="_blank" href="https://github.com/jgthms/bulma/tree/master/sass">4.5K lines</a> of Sass and <a target="_blank" href="https://github.com/jgthms/bulma/blob/master/css/bulma.css">9.5K lines</a> when compiled to CSS. What in the heck is all this code doing?! Bulma addresses 90% of common website patterns, like <a target="_blank" href="https://bulma.io/documentation/columns/">columns</a>, <a target="_blank" href="https://bulma.io/documentation/form/">forms</a>, <a target="_blank" href="https://bulma.io/documentation/components/">components</a>, <a target="_blank" href="https://bulma.io/documentation/modifiers/">modifiers</a>, <a target="_blank" href="https://bulma.io/documentation/layout/">layouts</a>, and <a target="_blank" href="https://bulma.io/documentation/elements/">elements</a>. The code is <em>also</em> responsive and can be further themed and customized.</p>
<p>Bulma doesn’t solve all problems, but can be <em>far</em> more productive than hand-coding Sass or CSS. And because Bulma compiles to CSS, it’s adaptable to JavaScript frameworks and libraries like Angular, React, and Vue. In short, Bulma works <em>like</em> Bootstrap but without <a target="_blank" href="https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript">JavaScript</a>.</p>
<p>Unlike Bootstrap, Bulma relies on CSS — not JavaScript. But like Bootstrap, ships with its own <a target="_blank" href="https://github.com/jgthms/bulma/blob/master/sass/base/minireset.sass">CSS Reset</a>. Now, let’s walk through how Bulma works from first principles. I’m assuming you’re <a target="_blank" href="https://medium.freecodecamp.org/how-to-design-and-develop-a-beautiful-blog-from-scratch-a0cd1af46845">familiar with HTML/CSS</a> but no more, thus this is what classic CSS looks like:</p>
<p><strong>Note:</strong> While this isn’t Bulma, it does demonstrate <em>how</em> Bulma works.</p>
<pre><code>&lt;!DOCTYPE html&gt;&lt;html&gt;  &lt;head&gt;    …    &lt;style&gt;
</code></pre><pre><code>p {  line-height: <span class="hljs-number">2</span>;}
</code></pre><pre><code>    &lt;<span class="hljs-regexp">/style&gt;  &lt;/</span>head&gt;  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>    <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>      A long time ago in a galaxy far far away…    <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>  <span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span></span>&lt;/html&gt;
</code></pre><p>Here we defined a <code>p</code> in our HTML, and in our CSS defined all <code>p</code>’s as having double-spaced lines, for example <code>line-height: 2</code>. Wait — what if we don’t want all <code>p</code>s to be double-spaced? Or what if we want some but not <em>all</em> to be double-spaced? Then we can instead opt-in to CSS using classes:</p>
<pre><code>&lt;!DOCTYPE html&gt;&lt;html&gt;  &lt;head&gt;    …    &lt;style&gt;
</code></pre><pre><code>.double-spaced {  line-height: <span class="hljs-number">2</span>;}
</code></pre><pre><code>    &lt;<span class="hljs-regexp">/style&gt;  &lt;/</span>head&gt;  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>    <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"double-spaced"</span>&gt;</span>      A long time ago in a galaxy far far away…    <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>  <span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span></span>&lt;/html&gt;
</code></pre><p>So we defined a class named <code>double-spaced</code> that we opt into versus having elements inherit CSS, like in the first example. And this is more sensible because it makes it harder for us to later overwrite our CSS. Still, we can go even further to make it harder, and we can make our class conditional:</p>
<pre><code>&lt;!DOCTYPE html&gt;&lt;html&gt;  &lt;head&gt;    …    &lt;style&gt;
</code></pre><pre><code>p.double-spaced {  line-height: <span class="hljs-number">2</span>;}
</code></pre><pre><code>    &lt;<span class="hljs-regexp">/style&gt;  &lt;/</span>head&gt;  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>    <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"double-spaced"</span>&gt;</span>      A long time ago in a galaxy far far away…    <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>  <span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span></span>&lt;/html&gt;
</code></pre><p>And now <code>double-spaced</code> requires the presence of a <code>p</code> element. This is <strong>conditional CSS</strong>, and we can go even further! We can use just classes, for example <code>class-1.class-2</code> to create <strong>conditional classes</strong>. This is one of the techniques Bulma uses to create HTML/CSS contracts.</p>
<blockquote>
<p><em><em>AHEM</em> Are we just writing CSS in our HTML now…?</em></p>
<p>(ง •̀_•́)ง</p>
</blockquote>
<p>The difference here is that Bulma emphasizes common patterns using semantics — not one-to-one CSS rules. This means we use Bulma to describe relationships — not rules — and therefore is more powerful. Also, Bulma’s <a target="_blank" href="https://bulma.io/documentation/">new documentation</a> is amazing and takes a lot of the guesswork out of CSS.</p>
<p>In addition to conditional classes, Bulma defines plentiful HTML/CSS contracts, which leads to more flexible CSS and more idiomatic code. And this is great for sharing code across teams. These contracts detail the relationship of classes to one another. Here’s a simple example of an HTML/CSS contract:</p>
<pre><code>&lt;section <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"section"</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">"container"</span>&gt;</span>    ...  <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>&lt;/section&gt;
</code></pre><p>Given enough well-designed classes and contracts, we can create all kinds of beautiful and responsive websites backed with Bulma. <a target="_blank" href="https://bulma.io/expo/">Check out the expo!</a> ⭐️ Now, before we get ahead of ourselves, let’s start with a “Hello World” and then the following slide — <a target="_blank" href="https://www.youtube.com/watch?v=EVekNsgUqn4">that’s no slide, it’s a website</a>.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*LN_Rupiz74q5b-yAfxgRQw.png" alt="Image" width="800" height="521" loading="lazy"></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*2hcqN-nehso7LlXNRNl7hQ.png" alt="Image" width="800" height="521" loading="lazy">
<em>Click either one to open in Scrimba’s interactive playground. ?</em></p>
<p>And in the near future, I’ll be releasing two ✌️ more articles detailing how we can build a <a target="_blank" href="https://twitter.com/username_ZAYDEK/status/994209963558944769">beautiful blog</a> and a <a target="_blank" href="https://twitter.com/username_ZAYDEK/status/994209997373423617">Tesla launch page</a> with Bulma! For updates, Follow me on <a target="_blank" href="https://medium.com/@ZAYDEK">Medium</a> ✍️ and <a target="_blank" href="https://twitter.com/username_ZAYDEK">Twitter</a>. ? I do, however, teach these in the free interactive Scrimba course. C<a target="_blank" href="https://scrimba.com/g/gbulma">lick here to enroll for free!</a> ?</p>
<p>And without further ado…</p>
<h3 id="heading-hello-world">“Hello World”</h3>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*LN_Rupiz74q5b-yAfxgRQw.png" alt="Image" width="800" height="521" loading="lazy">
<em>A <em>little</em> zoomed in. ? Click to open in Scrimba’s interactive playground. ?</em></p>
<p>Now that we understand how Bulma works, let’s learn how to “Hello World”:</p>
<pre><code>&lt;!DOCTYPE html&gt;&lt;html&gt;  &lt;head&gt;    &lt;meta charset="utf-8"&gt;    &lt;meta        name="viewport" content="width=device-width,        initial-scale=1"&gt;    &lt;title&gt;Hello Bulma!&lt;/title&gt;    &lt;link rel="stylesheet" href="https://…/bulma.min.css"&gt;    &lt;script defer src="https://…/all.js"&gt;&lt;/script&gt;  &lt;/head&gt;  &lt;body&gt;    &lt;section class="section"&gt;      &lt;div class="container"&gt;        &lt;h1 class="title"&gt;          Hello World        &lt;/h1&gt;        &lt;p class="subtitle"&gt;          My first website with &lt;strong&gt;Bulma&lt;/strong&gt;!        &lt;/p&gt;      &lt;/div&gt;    &lt;/section&gt;  &lt;/body&gt;&lt;/html&gt;
</code></pre><p>Come back — don’t be scared! ? All Bulma websites start from t<a target="_blank" href="https://bulma.io/documentation/overview/start/">his template.</a> Let’s focus on the h<code>ead</code> element first; the l<code>ink</code> pointing to b<code>ulma.min.css</code> loads Bulma, and the s<code>cript</code> pointing to a<code>ll.js</code> loads F<a target="_blank" href="https://fontawesome.com/">ont Awesome icons.</a> N<strong>ote:</strong> Bulma supports all icon font libraries.</p>
<p>And Bulma prefers to use <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5">HTML5 elements</a>, for example <code>section</code> versus <code>div</code> where appropriate. It’s more readable and idiomatic. Wait — what if the client’s browser is outdated and thus doesn’t acknowledge HTML5 elements? Bulma takes care of that, too!</p>
<pre><code><span class="hljs-comment">/* bulma.css#L312 */</span>
</code></pre><pre><code>article,aside,figure,footer,header,hgroup,section {  <span class="hljs-attr">display</span>: block;}
</code></pre><p>Thanks Bulma! ?‍ This guarantees that HTML5 elements are rendered as block elements despite the client’s browser. OK — let’s review the b<code>ody:</code></p>
<pre><code>&lt;section <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"section"</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">"container"</span>&gt;</span>    <span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"title"</span>&gt;</span>      Hello World    <span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>    <span class="hljs-tag">&lt;<span class="hljs-name">;p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"subtitle"</span>&gt;</span>      My first website with <span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>Bulma<span class="hljs-tag">&lt;<span class="hljs-name">;</span>/<span class="hljs-attr">strong</span>&gt;</span>!    <span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span></span>  &lt;<span class="hljs-regexp">/div&gt;&lt;/</span>section&gt;
</code></pre><p>When I first learned Bulma, I (╯°□°）╯︵ ┻━┻ because it’s so terse. But once I calmed down, I began to recognize an emergent pattern: the shape of our website’s tree. And it’s much simpler than I thought:</p>
<pre><code>   .section       |  .container     /   \.title  .subtitle   /       \ ...       ...
</code></pre><p><em>Ahhhh.</em> Where <code>.section</code> defines the start of new content, <code>.container</code> is a wrapper class for content (like text) and is used for responsive design. And <code>.title</code> and <code>.subtitle</code> are for aesthetics. Having done so, Bulma took care of dozens of details like best practices <em>and</em> responsive design. ??</p>
<h3 id="heading-beyond-hello-world">Beyond “Hello World” ?</h3>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*2hcqN-nehso7LlXNRNl7hQ.png" alt="Image" width="800" height="521" loading="lazy">
<em>Click to open in Scrimba’s interactive playground. ?</em></p>
<p>Think of Bulma as lego pieces with modifiers, like color variants. And so, composing this website requires just a few pieces and modifiers, such as <code>.columns</code>, <code>.media</code>, <code>.icon</code> — that’s it. Though the code <em>is</em> more complex, that’s because it’s code. The composition of the website is what’s simple:</p>
<pre><code>         .column            |         .media          /   \.media-left  .media-content        /       \    .icon      .content      /           \    ...           ...
</code></pre><p>The above is what one Bulma column looks like as a tree. And in code:</p>
<pre><code>…&lt;div <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"column"</span>&gt;  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">article</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"media notification is-info"</span>&gt;</span>    <span class="hljs-tag">&lt;<span class="hljs-name">figure</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"media-left"</span>&gt;</span>      <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"icon is-medium"</span>&gt;</span>        <span class="hljs-tag">&lt;<span class="hljs-name">i</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"fab fa-2x fa-css3-alt"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span>      <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>    <span class="hljs-tag">&lt;/<span class="hljs-name">figure</span>&gt;</span>    <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"media-content"</span>&gt;</span>      <span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"content"</span>&gt;</span>        <span class="hljs-tag">&lt;<span class="hljs-name">h1</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"title is-size-4"</span>&gt;</span>          Bulma        <span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>        <span class="hljs-tag">&lt;<span class="hljs-name">p</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"is-size-5"</span>&gt;</span>          <span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>Bulma<span class="hljs-tag">&lt;/<span class="hljs-name">strong</span>&gt;</span> is a modern CSS framework...        <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 class="hljs-tag">&lt;/<span class="hljs-name">article</span>&gt;</span></span>&lt;/div&gt;…
</code></pre><p><strong>Note</strong>: Modifiers such as <code>.notification</code>, <code>.is-info</code>, <code>.is-medium</code>, and so on help personalize our website. Some modifiers are conditional and require another class, and some are general-use. You can learn more about them <a target="_blank" href="https://bulma.io/documentation/modifiers/">here</a>. And for an interactive playground of the complete website, <a target="_blank" href="https://scrimba.com/c/cyr3dT3">click here</a>. ?</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*AeG2UlfaWGBM7VVT0BZVmQ.png" alt="Image" width="800" height="521" loading="lazy">
<em>Click to open in Scrimba’s interactive playground. ?</em></p>
<blockquote>
<p><strong>Bulma is fascinating! We can design beautiful and responsive websites using semantics — without writing CSS.</strong></p>
</blockquote>
<h3 id="heading-final-thoughts">Final thoughts ?</h3>
<p>The thing I love most about Bulma is that it’s a means to understand how its creator thinks without having to ask him. How do I do X? <a target="_blank" href="https://github.com/jgthms/bulma/">Look it up!</a> <strong>This is a powerful idea — that we can look into a CSS guru’s mind for answers, rather than hack unideal solutions ourselves.</strong></p>
<p><strong>Thanks for reading!</strong> I was hesitant to learn Bulma at first, but then came to appreciate how powerful and idiomatic it can be. So I decided that Bulma shouldn’t go unnoticed, because designing and developing websites can often be <em>much</em> harder than anticipated. Again — <strong>thanks for reading!</strong> <em>???</em></p>
<h3 id="heading-like-this-theres-two-more-click-herehttpsmediumfreecodecamporghow-to-build-a-responsive-blog-design-with-bulma-css-c2257a17c16b-and-herehttpsmediumfreecodecamporghow-to-build-a-responsive-tesla-launch-page-with-bulma-css-2bf484057349"><em>Like this? There’s two more — click <a target="_blank" href="https://medium.freecodecamp.org/how-to-build-a-responsive-blog-design-with-bulma-css-c2257a17c16b">here</a> and <a target="_blank" href="https://medium.freecodecamp.org/how-to-build-a-responsive-tesla-launch-page-with-bulma-css-2bf484057349">here</a>!</em></h3>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*jYb2etzcRa1YfBSm_JYjGQ.gif" alt="Image" width="800" height="500" loading="lazy"></p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/1*lzMU40hG75TH-k1oNlSfdQ.gif" alt="Image" width="800" height="500" loading="lazy">
_Want to learn how to <em>build</em> this 3D graphic? [Let me know!](http://bit.do/subscribe-d82dcb4b980a" rel="noopener" target="<em>blank" title=")</em></p>
<h4 id="heading-consider-supporting-jgthmshttpsjgthmscom-on-patreonhttpswwwpatreoncomjgthms-hes-determined-to-make-bulma-his-livelihood-and-full-time-commitment"><em>Consider supporting <a target="_blank" href="https://jgthms.com/">jgthms</a> on <a target="_blank" href="https://www.patreon.com/jgthms">Patreon</a>! He’s determined to make Bulma his livelihood and full-time commitment. ?‍?</em></h4>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ My Journey into the Bulma CSS Framework ]]>
                </title>
                <description>
                    <![CDATA[ By Henrik Ståhl I recently decided to try out a CSS framework. As a journalist, I’ve been taught to work from the ground up, do things thoroughly, and never “borrow” stuff from others (in the news industry, that’s considered plagiarism). Therefore I’... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/colorful-fundamentals-the-reward-of-building-with-bulma-7b14883317bd/</link>
                <guid isPermaLink="false">66c3478ceb0555cdb6fd9ad7</guid>
                
                    <category>
                        <![CDATA[ Bulma ]]>
                    </category>
                
                    <category>
                        <![CDATA[ CSS ]]>
                    </category>
                
                    <category>
                        <![CDATA[ tech  ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Design ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Development ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Tue, 25 Jul 2017 20:31:44 +0000</pubDate>
                <media:content url="https://cdn-media-1.freecodecamp.org/images/1*_NUWv4R8wXKkd2SO9OYzyw.jpeg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Henrik Ståhl</p>
<p>I recently decided to try out a CSS framework. As a journalist, I’ve been taught to work from the ground up, do things thoroughly, and never “borrow” stuff from others (in the news industry, that’s considered plagiarism). Therefore I’ve been kind of reluctant to use frameworks since starting my <a target="_blank" href="https://news.maythecode.com">coding journey</a>. Simply because I felt that it would be like cheating, if you know what I mean.</p>
<p>I couldn’t have been more wrong.</p>
<p>First things first. After experimenting a little bit on my own with video as fullscreen background — a very fun and interesting challenge, by the way — I wanted more actual content to work with before diving head first into <a target="_blank" href="http://bulma.io">Bulma</a>, a modern framework based on Flexbox created by <a target="_blank" href="https://www.freecodecamp.org/news/colorful-fundamentals-the-reward-of-building-with-bulma-7b14883317bd/undefined">Jeremy Thomas</a>.</p>
<p>That’s why I eventually decided <em>not</em> to experiment with Bulma on my <a target="_blank" href="http://maythecode.com">May The Code</a> website.</p>
<p>Instead, I chose to redesign a website I created for my now defunct Swedish rock band <a target="_blank" href="http://play.spotify.com/album/2bXUzHUmEZpXpTc6mNbQgH">Evangeliet</a> (we’ve been on a hiatus since 2014).</p>
<p>In this story, I will tell you why I felt bullied by PHP, how I failed and failed again despite reading through the documentation over and over, and what I finally learned by screwing everything up.</p>
<h3 id="heading-the-new-front-page">The New Front Page</h3>
<p>I had already implemented a first iteration of a front page with fullscreen video as background and a simple nav bar, so the first thing I did was to replace my somewhat ugly navigation bar with a Bulma navigation.</p>
<p>Adding the nav wasn’t particularly hard. At least not after reading the <a target="_blank" href="http://bulma.io/documentation/components/navbar/">documentation</a> a bunch of times. But the fullscreen video as background was a bit trickier. After some fruitless experimentations with different Bulma layout elements, such as <code>.hero</code> and <code>.container is-fluid</code>, I created a custom CSS to handle the fullscreen background:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/-ZGqYF8cCpi-JMaFsHY3GaCA3D6pzEaug8OH" alt="Image" width="800" height="398" loading="lazy">
<em>My custom CSS.</em></p>
<p>It worked! At least on desktop. As soon as I grabbed my phone to check it out on a smaller viewport, I quickly found out that I had been brutally punished by my outdated desktop-first approach:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/MJ-29W0oP39KFc6FkIE2jGBWpw-DcgseAHkG" alt="Image" width="800" height="418" loading="lazy">
<em>The GIF image I made didn’t override the video on mobile.</em></p>
<p>And as you can see, I accidentally put the nav bar and the fullscreen background video in separate <code>sections</code> in the HTML document, resulting in the former being detached from the latter.</p>
<p>I was nevertheless motivated to move forward, so I left it the way it was for the time being.</p>
<h3 id="heading-the-audio-page">The Audio Page</h3>
<p>Next, I wanted to create a neat audio page. The page itself is pretty straightforward: it’s <a target="_blank" href="https://medium.com/backchannel/meet-the-ultimate-wikignome-10508842caad">composed of</a> three album “blocks” with Spotify lists. First, I created a <code>fluid container</code> with an image:</p>
<pre><code>&lt;div <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"container is-fluid"</span>&gt;  <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">figure</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"image"</span>&gt;</span>    <span class="hljs-tag">&lt;<span class="hljs-name">img</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"/smoke.jpeg"</span> <span class="hljs-attr">alt</span>=<span class="hljs-string">"Evangeliet"</span>&gt;</span>  <span class="hljs-tag">&lt;/<span class="hljs-name">figure</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
</code></pre><p>Then, I scanned the Bulma <a target="_blank" href="https://bulma.io/documentation/form/general/">documentation</a> in the hopes of finding a component that would fit my need. I eventually settled on a <code>card</code>:</p>
<pre><code>&lt;div <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"card"</span>&gt;          &lt;div class="card-image"&gt;            &lt;figure class="image is-square"&gt;              &lt;img src="/Konturen.jpeg" alt="Konturen av en dröm"&gt;            &lt;/figure&gt;          &lt;/div&gt;          &lt;div class="card-content"&gt;            &lt;div class="media"&gt;              &lt;div class="media-left"&gt;              &lt;/div&gt;              &lt;div class="media-content"&gt;                &lt;p class="title is-4"&gt;Konturen av en dröm&lt;/p&gt;                &lt;p class="subtitle is-6"&gt;2013&lt;/p&gt;              &lt;/div&gt;            &lt;/div&gt;
</code></pre><p>I then nestled a <code>.card-content</code> class inside the <code>card</code> component:</p>
<pre><code>&lt;div <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"content"</span>&gt;              <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">iframe</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://open.spotify.com/embed?uri=spotify:album:2bXUzHUmEZpXpTc6mNbQgH&amp;theme=white"</span> <span class="hljs-attr">width</span>=<span class="hljs-string">"100%"</span> <span class="hljs-attr">height</span>=<span class="hljs-string">"380"</span> <span class="hljs-attr">frameborder</span>=<span class="hljs-string">"0"</span> <span class="hljs-attr">allowtransparency</span>=<span class="hljs-string">"true"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">iframe</span>&gt;</span></span>              <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">br</span>&gt;</span>              <span class="hljs-tag">&lt;<span class="hljs-name">small</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>UPC:<span class="hljs-tag">&lt;/<span class="hljs-name">strong</span>&gt;</span> 0885014300335<span class="hljs-tag">&lt;/<span class="hljs-name">small</span>&gt;</span>              <span class="hljs-tag">&lt;<span class="hljs-name">small</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>Catalog Number:<span class="hljs-tag">&lt;/<span class="hljs-name">strong</span>&gt;</span> RU 27130<span class="hljs-tag">&lt;/<span class="hljs-name">small</span>&gt;</span>              <span class="hljs-tag">&lt;<span class="hljs-name">br</span>&gt;</span>              <span class="hljs-tag">&lt;<span class="hljs-name">small</span>&gt;</span><span class="hljs-tag">&lt;<span class="hljs-name">strong</span>&gt;</span>Release date:<span class="hljs-tag">&lt;/<span class="hljs-name">strong</span>&gt;</span> 18 Dec 2013<span class="hljs-tag">&lt;/<span class="hljs-name">small</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>        &lt;/div&gt;
</code></pre><p>To get a nice <a target="_blank" href="https://developer.spotify.com/technologies/widgets/spotify-play-button/">Spotify player</a>, I fetched an embed code from the <a target="_blank" href="https://developer.spotify.com">Spotify Developer</a> docs. (I changed the width from <code>300px</code> to <code>100%</code>, and the theme from default black to white, which suits my design better.)</p>
<p>I created three cards, added some album info, and bundled them with <code>column</code> elements. The result was pleasing:</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/IHpzh37izjj1QmGVLbZ5qpEIUGylMYR9a1Fy" alt="Image" width="600" height="313" loading="lazy"></p>
<h3 id="heading-the-image-grid">The Image Grid</h3>
<p>After that, I wanted to create some sort of page containing pictures of the band. I wanted something more challenging than a standard “band member biographies” page, which wouldn’t have differed all that much from the audio page.</p>
<p>I scanned the <a target="_blank" href="http://bulma.io/documentation/grid/tiles/">documentation</a> once again and decided to do something with the <code>tiles</code> element. This element is</p>
<blockquote>
<p>“[a] <strong>single tile</strong> element to build 2-dimensional Metro-like, Pinterest-like, or whatever-you-like grids.”</p>
</blockquote>
<p>I read and contemplated the docs over and over, and reached a conclusion: since I still consider myself a markup beginner, I needed to do some hands-on experimentation in order to wrap my head around the Bulma tiles. Because reading… well, it didn’t get me anywhere.</p>
<p>So I basically copy-pasted one of the examples from the docs and altered the content. I flipped stuff around, effectively breaking <em>everything</em>. Learning by screwing up, right? :)</p>
<p>After messing around with the different classes, I opted for a 3 column grid structure, composed of various tile elements. Here’s an example of the markup:</p>
<pre><code>&lt;div <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"tile is-ancestor"</span>&gt;        &lt;div class="tile is-parent"&gt;          &lt;article class="tile is-child box"&gt;            &lt;figure&gt;              &lt;img src="/bilder/molotov.jpg"&gt;              &lt;figcaption&gt;                Henrik lägger mjuka riff i &lt;strong&gt;Molotov Studios&lt;/strong&gt; 2010. Inspelningen rattades av Martin Karlsson.              &lt;/figcaption&gt;            &lt;/figure&gt;          &lt;/article&gt;        &lt;/div&gt;        &lt;div class="tile is-parent"&gt;          &lt;article class="tile is-child box"&gt;            &lt;p class="title"&gt;Stadsmissionen&amp;lt;/p&gt;            &lt;p class="subtitle"&gt;2009&lt;/p&gt;            &lt;figure&gt;              &lt;img src="/bilder/duo.jpg"&gt;              &lt;figcaption&gt;                På den här tiden var &lt;strong&gt;Evangeliet&lt;/strong&gt; fortfarande en duo.                &lt;br&gt;                FOTO: Noelia Ivars Rico              &lt;/figcaption&gt;            &lt;/figure&gt;          &lt;/article&gt;        &lt;/div&gt;        &lt;div class="tile is-parent"&gt;          &lt;article class="tile is-child box"&gt;            &lt;figure&gt;              &lt;img src="/bilder/bandbild2.jpg"&gt;              &lt;figcaption&gt;                Cristóbal, David, Henrik R och Henrik S i replokalen i Fruängen, januari 2011.              &lt;/figcaption&gt;            &lt;/figure&gt;          &lt;/article&gt;        &lt;/div&gt;      &lt;/div&gt;
</code></pre><p>The example above is the <strong>three top images</strong> on the webpage. The structure of the <code>tile boxes</code> on the page are more or less the same as in the docs, except for the fact that I added images in all boxes except one. Also, I inserted <code>column elements</code> and added three images in one of the boxes.</p>
<p>Which required a bit of patience, given the fact that:</p>
<ol>
<li>I still get dizzy quite easily by all the tags and end tags when nesting stuff, and</li>
<li>I wasn’t aware of the visual feature in <a target="_blank" href="http://atom.io">Atom</a> highlighting opening and closing HTML tags. ??‍</li>
</ol>
<p>I could have gone for either of the different structures I tested during the experimental phase, but I considered the layout provided in the Bulma docs the best fit. Why fix something that isn’t broken?</p>
<p>And honestly, I like the fact that the mobile users see a few images <em>before</em> getting to the text chunk. That’s why I switched back to the current structure after initially mirroring the 2nd column and placing its five boxes in the top of the page, effectively positioning the tall vertical box in the top left corner on desktop.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/zvlvyo8qzGPf8TSVOkz021Pgw6jet7snxNZq" alt="Image" width="600" height="313" loading="lazy"></p>
<h3 id="heading-the-contact-page">The Contact Page</h3>
<p>Last but not least, I wanted a contact page. With an email form and everything.</p>
<p>Again, the <a target="_blank" href="http://bulma.io/documentation/elements/form/">documentation</a> provided everything I needed in terms of markup. A no-brainer. Fortunately, I had already tried to learn just a tiny bit of PHP with the sole purpose of creating an online form (for a different website though).</p>
<p>And I had failed. Hard.</p>
<p>I don’t know why other people seem to hate PHP, I guess it’s for various reasons. But I do know that personally, I dislike PHP because I felt bullied by it.</p>
<p>It felt like I’d tried <em>everything.</em> I read a bunch of blog posts and worked through the entire <a target="_blank" href="https://www.w3schools.com/pHp/default.asp">W3Schools</a> tutorial. But I still didn’t grasp a fraction of PHP.</p>
<p>Anyway, during my short stint as a PHP marauder, I stumbled upon <a target="_blank" href="https://github.com/formspree/formspree">Formspree</a>, an online form service created by <a target="_blank" href="https://www.freecodecamp.org/news/colorful-fundamentals-the-reward-of-building-with-bulma-7b14883317bd/undefined">Rohit Datta</a>.</p>
<p>As I had previously used Formspree both on the <a target="_blank" href="http://maythecode.com">May The Code</a> website with great results, I knew that it would work for my band’s website as well.</p>
<p>I added the <code>field</code> and <code>label</code> classes needed, as well as the required <code>form action=”https://formspree.io/xx@xx.se" method=”POST"</code> class — and that was it!</p>
<p>After submitting the form and confirming my email, everything worked like a charm.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/NcU1VqEQT9kL4auEY4hm9y9q90nvnlDNiPr7" alt="Image" width="600" height="313" loading="lazy"></p>
<p>I fixed the size of the form on desktop with a few lines of CSS in my custom stylesheet, but not until way later. The form was up and running and I was happy.</p>
<h4 id="heading-what-about-the">What about the ??</h4>
<p>Now I was left with just one challenge: how can I make the hamburger menu on mobile actually work? ?</p>
<p>The Bulma documentation provided markup only. The functionality itself was up to me to fix.</p>
<p>Since then, Jeremy has updated the docs and replaced the old <code>nav</code> component with the new <code>navbar</code> component. Here’s an example of the old one:</p>
<pre><code>&lt;!-- This <span class="hljs-string">"nav-toggle"</span> hamburger menu is only visible on mobile --&gt;  &lt;!-- You need JavaScript to toggle the <span class="hljs-string">"is-active"</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">on</span> "<span class="hljs-title">nav</span>-<span class="hljs-title">menu</span>" --&gt;  &lt;<span class="hljs-title">span</span> <span class="hljs-title">class</span></span>=<span class="hljs-string">"nav-toggle"</span>&gt;    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">span</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span></span>    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">span</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span></span>    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">span</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span></span>  &lt;<span class="hljs-regexp">/span&gt;  &lt;!-- This "nav-menu" is hidden on mobile --&gt;  &lt;!-- Add the modifier "is-active" to display it on mobile --&gt;  &lt;div class="nav-right nav-menu"&gt;    &lt;a class="nav-item"&gt;      Home    &lt;/</span>a&gt;    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-item"</span>&gt;</span>      Documentation    <span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span></span>    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-item"</span>&gt;</span>      Blog    <span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span></span>
</code></pre><p>I’ve gained a lot of ground in the few months, but I’m not yet comfortable enough with HTML and CSS to make the leap to real programming, so I really wanted to make this work without diving into the vast sea of JavaScript.</p>
<p>I had no idea how.</p>
<p>That’s why I opted for a horizontal menu bar all the way down to the smallest viewports, after what felt like hours of investigations. All I needed to do was add the <code>is-mobile</code> modifier to the <code>nav-item</code> class:</p>
<pre><code>&lt;nav <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"nav has-shadow"</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">"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">"nav-left"</span>&gt;</span>        <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-item is-tab is-mobile"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"/"</span>&gt;</span>Hem<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>        <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-item is-tab is-mobile"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"/musik"</span>&gt;</span>Musik<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>        <span class="hljs-symbol">&amp;lt;</span>a class="nav-item is-tab is-mobile" href="/bandet"&gt;Bandet<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>        <span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"nav-item is-tab is-mobile is-active"</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"/kontakt"</span>&gt;</span>Kontakt<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span>      <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>  &lt;/nav&gt;
</code></pre><p>I could do this because my menu consisted of just four components: front page, audio page, band page, and contact page. Because of this, everything was visible — and accessible — even in smaller viewports.</p>
<p>A week or so later, I stumbled upon <a target="_blank" href="https://github.com/jgthms/bulma/issues/238">this great thread</a> on GitHub. The user <a target="_blank" href="https://github.com/rudedogg">rudedogg</a> had the exact same problem as I did. Many different solutions are provided in the thread, such as</p>
<blockquote>
<p>Yeah you simply need a JS event to handle the click and “add” or “remove” the ‘.is-active’-class on ‘#nav-menu’.</p>
</blockquote>
<p>and</p>
<blockquote>
<p>React snippet (w/o jQuery) on an element with <code>className="nav-toggle" onClick={() =&gt; { let toggle = document.querySelector(".nav-toggle"); let menu = document.querySelector(".nav-menu"); toggle.classList.toggle("is-active"); menu.classList.toggle("is-active");</code> }}</p>
</blockquote>
<p>Nothing seemed to completely fill my need. Until I scrolled down and found this incredibly humble, short, and brilliant comment by <a target="_blank" href="https://github.com/shaneturner">shaneturner</a>:</p>
<blockquote>
<p>A bit more succinct on the nav item itself: <code>&lt;span class="nav-toggle" onclick="document.querySelector('.nav-menu').classList.toggle('is-active')</code>;"&gt;</p>
</blockquote>
<p>I’m in no position to determine if this is the best solution, neither if it’s actually better than any other suggestion in the GitHub thread. But I tried it out and it worked immediately, right out of the box.</p>
<p><img src="https://cdn-media-1.freecodecamp.org/images/pkkqVwjpP-7RLOt8QqA6rEDJDvL4s7U62CZR" alt="Image" width="800" height="610" loading="lazy">
_Photo by [Unsplash](https://unsplash.com/@mkwlsn?utm_medium=referral&amp;utm_campaign=photographer-credit&amp;utm_content=creditBadge" rel="noopener" target="_blank" title=""&gt;Mike Wilson on &lt;a href="https://unsplash.com/photos/vAqmcvSMWMU" rel="noopener" target="<em>blank" title=").</em></p>
<h3 id="heading-iterations">Iterations</h3>
<p>I was done. Mission complete.</p>
<p>It felt so good! Not only had I been able to build an entire website using Bulma — I had also learned a great deal about HTML and CSS scanning through the documentation and experimenting with the different elements.</p>
<p>What had first felt like a mountain to climb turned into a medium-sized hill, and here I was standing at the top.</p>
<p>I wasn’t fully satisfied though. Now I knew how to use Bulma to build a website, but the website I’d built wasn’t anyway near perfect. Next, I wanted to climb the next hill, the higher one, and come just a little bit closer to perfection. In other words: using Bulma to build a website I’m actually proud of.</p>
<p>And I did.</p>
<p>But that’s another story.</p>
<p><em>Henrik Ståhl is a journalist with more than 15 years of experience, recently turned Product Owner at Bonnier News, working with the digital development of <a target="_blank" href="http://beta.di.se">Dagens industri</a> and <a target="_blank" href="http://dn.se">Dagens Nyheter</a>. In his spare time, he’s trying to learn programming.</em></p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
