CSS Quickies: CSS Variables - Or how you create a ๐ŸŒžwhite/๐ŸŒ‘dark theme easily - DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

<div data-article-id="167188" id="article-body" itemprop="articleBody" readability="235.18447204969">
<h3>
<a name="what-is-css-quickes" href="#what-is-css-quickes" class="anchor">
</a>
What is CSS Quickes?
</h3>

<p>I started to ask my beloved community on Instagram: "what CSS properties are confusing for you?"</p>

<p>In "CSS Quickies" I will explain one CSS property in depth. These are community requested properties. If you also confused about a CSS property, then write to me on <a href="https://www.instagram.com/lampewebdev/" style="color: inherit; text-decoration: none;" name="readabilityLink-1">Instagram</a><a href="#readabilityFootnoteLink-1" class="readability-DoNotFootnote" style="color: inherit;"><small><sup>[1]</sup></small></a> or <a href="https://twitter.com/lampewebdev" style="color: inherit; text-decoration: none;" name="readabilityLink-2">Twitter</a><a href="#readabilityFootnoteLink-2" class="readability-DoNotFootnote" style="color: inherit;"><small><sup>[2]</sup></small></a> or down below in the comments! I answer all questions.</p>

<p>I'm also live streaming while coding on <a href="https://www.twitch.tv/lampewebdev/" style="color: inherit; text-decoration: none;" name="readabilityLink-3">twitch.tv</a><a href="#readabilityFootnoteLink-3" class="readability-DoNotFootnote" style="color: inherit;"><small><sup>[3]</sup></small></a> if you want to spend some fun time or you can ask me any question!</p>

<h3>
<a name="lets-talk-about-raw-custom-properties-endraw-aka-raw-css-variables-endraw-" href="#lets-talk-about-raw-custom-properties-endraw-aka-raw-css-variables-endraw-" class="anchor">
</a>
Let's talk about <code>Custom properties</code> aka <code>CSS Variables</code>.
</h3>

<p>Finally! If you ever have worked with CSS and wanted to keep your design consistent? Or was it more like at some pages, your website had different padding, margin or colors?</p>

<p>Maybe you wanted to implement a dark theme? It was possible, but now it has become easier!</p>

<p>Of course, if you have used LESS or SASS, then you know variables, and now they are finally supported natively. ๐Ÿ˜</p>

<p>Let's have a look at it!</p>

<h4>
<a name="defining-a-css-variable" href="#defining-a-css-variable" class="anchor">
</a>
Defining a CSS variable
</h4>

<p>You define a CSS variable with prefixing a CSS property with <code>--</code>. Let's look at some examples.<br/></p>

<div class="highlight" readability="11"><pre class="highlight css"><code><span class="nd">:root</span><span class="p">{</span>
<span class="py">--example-color</span><span class="p">:</span> <span class="m">#ccc</span><span class="p">;</span>
<span class="py">--example-align</span><span class="p">:</span> <span class="nb">left</span><span class="p">;</span>
<span class="py">--example-shadow</span><span class="p">:</span> <span class="m">10px</span> <span class="m">10px</span> <span class="m">5px</span> <span class="m">0px</span> <span class="n">rgba</span><span class="p">(</span><span class="m">0</span><span class="p">,</span><span class="m">0</span><span class="p">,</span><span class="m">0</span><span class="p">,</span><span class="m">0.75</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div>

<p>Your first question is: "What is that ':root' pseudo-class?".<br/>Good question! The <code>:root</code> pseudo-class is as you would use the <code>html</code> selector except that the specificity is higher of the ':root' pseudo-class. This means that if you set properties in the <code>:root</code> pseudo-class it will win over the <code>html</code> selector.</p>

<p>Okay, the rest is pretty simple. The custom property <code>--example-color</code> has the value of <code>#ccc</code>. When we use the custom property, for example, on the <code>background-color</code> property, the background of that element will be a light gray. Cool right?</p>

<p>You can give the custom property, aka CSS variable every value you could give any other property in CSS. It is okay to use <code>left</code> for example or <code>10px</code> and so on.</p>
<h4>
<a name="using-css-variables" href="#using-css-variables" class="anchor">
</a>
Using CSS variables
</h4>

<p>Now that we know how to set CSS variables, we need to learn how to use them!</p>

<p>For this, we need to learn the <code>var()</code> function.<br/>The <code>var()</code> can have two arguments. The first argument needs to be a custom property. If the custom property is not valid, you want to have a fallback value. To achieve this, you simply need to set the second argument of the <code>var()</code> function. Let's look at an example.<br/></p>

<div class="highlight" readability="8"><pre class="highlight css"><code><span class="nd">:root</span><span class="p">{</span>
<span class="py">--example-color</span><span class="p">:</span> <span class="m">#ccc</span><span class="p">;</span>
<span class="p">}</span>

<span class="nc">.someElement</span> <span class="p">{</span>
<span class="nl">background-color</span><span class="p">:</span> <span class="n">var</span><span class="p">(</span><span class="n">--example-color</span><span class="p">,</span> <span class="m">#d1d1d1</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div>

<p>This should be now pretty straightforward for you to understand. We are setting the <code>--example-color</code> to <code>#ccc</code> and then we are using it in <code>.someElement</code> to set the background color. If something goes wrong and our <code>--example-color</code> is not valid, we have a fallback value of <code>#d1d1d1</code>.</p>

<p>What happens if you don't set a fallback value and your custom variable is invalid? The browser then will act as if this property was not specified and do its regular job.</p>

<h4>
<a name="tips-and-tricks" href="#tips-and-tricks" class="anchor">
</a>
Tips and tricks
</h4>

<h5>
<a name="multiple-fallback-values" href="#multiple-fallback-values" class="anchor">
</a>
Multiple fallback values
</h5>

<p>What if you want to have multiple fallback values? So you would think you could do the following:<br/></p>

<div class="highlight" readability="9"><pre class="highlight css"><code><span class="nc">.someElement</span> <span class="p">{</span>
<span class="nl">background-color</span><span class="p">:</span> <span class="n">var</span><span class="p">(</span><span class="n">--first-color</span><span class="p">,</span> <span class="n">--second-color</span><span class="p">,</span> <span class="no">white</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div>

<p>This will not work. After the first comma <code>var()</code> treats everything even the commas as a value. The browser would change this into <code>background-color: --second-color, white;</code>. This is not what we want. </p>

<p>To have multiple values, we can simply call <code>var()</code> inside a <code>var()</code>. Here comes an example:<br/></p>

<div class="highlight" readability="9"><pre class="highlight css"><code><span class="nc">.someElement</span> <span class="p">{</span>
<span class="nl">background-color</span><span class="p">:</span> <span class="n">var</span><span class="p">(</span><span class="n">--first-color</span><span class="p">,</span> <span class="n">var</span><span class="p">(</span><span class="n">--second-color</span><span class="p">,</span> <span class="no">white</span><span class="p">));</span>
<span class="p">}</span>
</code></pre></div>

<p>Now this would produce our desired outcome. When both <code>--first-color</code> and <code>--second-color</code> are invalid then the browser will set the background to <code>white</code>.</p>

<h5>
<a name="what-if-my-fallback-value-needs-a-comma" href="#what-if-my-fallback-value-needs-a-comma" class="anchor">
</a>
What if my fallback value needs a comma?
</h5>

<p>What to do if for example, you want to set a <code>font-family</code> in in the fallback value and you need to specify more then one font? Looking back at the tip before this should be now straight forward. We simply write it with the commas. Example time:<br/></p>

<div class="highlight" readability="10"><pre class="highlight css"><code><span class="nc">.someElement</span> <span class="p">{</span>
<span class="nl">font-family</span><span class="p">:</span> <span class="n">var</span><span class="p">(</span><span class="n">--main-font</span><span class="p">,</span> <span class="s1">"lucida grande"</span> <span class="p">,</span> <span class="n">tahoma</span><span class="p">,</span> <span class="n">Arial</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div>

<p>Here we can see the after the first comma the <code>var()</code> function treats everything like one value.</p>

<h5>
<a name="setting-and-getting-custom-properties-in-javascript" href="#setting-and-getting-custom-properties-in-javascript" class="anchor">
</a>
Setting and getting custom properties in Javascript
</h5>

<p>In more complex apps and websites, you will javascript for state management and rendering. You also can get and set custom properties with javascript. Here is how you can do it:<br/></p>

<div class="highlight" readability="10"><pre class="highlight javascript"><code> <span class="kd">const</span> <span class="nx">element</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="dl">'</span><span class="s1">.someElement</span><span class="dl">'</span><span class="p">);</span>
<span class="c1">// Get the custom propety</span>
<span class="nx">element</span><span class="p">.</span><span class="nx">style</span><span class="p">.</span><span class="nx">getPropertyValue</span><span class="p">(</span><span class="dl">"</span><span class="s2">--first-color</span><span class="dl">"</span><span class="p">);</span>
<span class="c1">// Set a custom propety</span>
<span class="nx">element</span><span class="p">.</span><span class="nx">style</span><span class="p">.</span><span class="nx">setProperty</span><span class="p">(</span><span class="dl">"</span><span class="s2">--my-color</span><span class="dl">"</span><span class="p">,</span> <span class="dl">"</span><span class="s2">#ccc</span><span class="dl">"</span><span class="p">);</span>
</code></pre></div>

<p>We can get and set the custom properties like any other property. Isn't that cool?</p>

<h4>
<a name="making-a-theme-switcher-with-custom-variables" href="#making-a-theme-switcher-with-custom-variables" class="anchor">
</a>
Making a theme switcher with custom variables
</h4>

<p>Let's first have a look at what we will do here:<br/>
</p>

<h5>
<a name="the-html-markup" href="#the-html-markup" class="anchor">
</a>
The HTML markup
</h5>

<div class="highlight" readability="9"><pre class="highlight html"><code><span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"grid theme-container"</span><span class="nt">&gt;</span>
<span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"content"</span><span class="nt">&gt;</span>
<span class="nt">&lt;div</span> <span class="na">class=</span><span class="s">"demo"</span><span class="nt">&gt;</span>
<span class="nt">&lt;label</span> <span class="na">class=</span><span class="s">"switch"</span><span class="nt">&gt;</span>
<span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">"checkbox"</span> <span class="na">class=</span><span class="s">"theme-switcher"</span><span class="nt">&gt;</span>
<span class="nt">&lt;span</span> <span class="na">class=</span><span class="s">"slider round"</span><span class="nt">&gt;&lt;/span&gt;</span>
<span class="nt">&lt;/label&gt;</span>
<span class="nt">&lt;/div&gt;</span>
<span class="nt">&lt;/div&gt;</span>
<span class="nt">&lt;/div&gt;</span>
</code></pre></div>

<p>Really nothing special here. <br/>We will use CSS <code>grid</code> to center the content that's why we have a <code>.grid</code> class on our first element the <code>.content</code> and <code>.demo</code> Classes are just for styling. The two crucial classes here are <code>.theme-container</code> and <code>.theme.switcher</code>.</p>
<h5>
<a name="the-javascript-code" href="#the-javascript-code" class="anchor">
</a>
The Javascript code
</h5>

<div class="highlight" readability="11"><pre class="highlight javascript"><code><span class="kd">const</span> <span class="nx">checkbox</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="dl">"</span><span class="s2">.theme-switcher</span><span class="dl">"</span><span class="p">);</span>

<span class="nx">checkbox</span><span class="p">.</span><span class="nx">addEventListener</span><span class="p">(</span><span class="dl">"</span><span class="s2">change</span><span class="dl">"</span><span class="p">,</span> <span class="kd">function</span><span class="p">()</span> <span class="p">{</span>
<span class="kd">const</span> <span class="nx">themeContainer</span> <span class="o">=</span> <span class="nb">document</span><span class="p">.</span><span class="nx">querySelector</span><span class="p">(</span><span class="dl">"</span><span class="s2">.theme-container</span><span class="dl">"</span><span class="p">);</span>
<span class="k">if</span> <span class="p">(</span><span class="nx">themeContainer</span> <span class="o">&amp;&amp;</span> <span class="k">this</span><span class="p">.</span><span class="nx">checked</span><span class="p">)</span> <span class="p">{</span>
<span class="nx">themeContainer</span><span class="p">.</span><span class="nx">classList</span><span class="p">.</span><span class="nx">add</span><span class="p">(</span><span class="dl">"</span><span class="s2">light</span><span class="dl">"</span><span class="p">);</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="nx">themeContainer</span><span class="p">.</span><span class="nx">classList</span><span class="p">.</span><span class="nx">remove</span><span class="p">(</span><span class="dl">"</span><span class="s2">light</span><span class="dl">"</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">});</span>
</code></pre></div>

<p>First we are selecting our <code>.theme-switcher</code> input and the <code>.theme-container</code> element. <br/>Then we are adding an event listener that listens if a change happens. This means that every time you click on the input, the callback for that event listener will run.<br/>In the <code>if</code> clause we are checking if there is a <code>.themeContainer</code> and if the checkbox input is checked.<br/>When this check is true, we are adding the <code>.light</code> class to the <code>.themeContainer</code> and if it is false, we are removing it.</p>

<p>Why are we removing and adding the <code>.light</code> Class? We will answer this now.</p>
<h5>
<a name="the-css-code" href="#the-css-code" class="anchor">
</a>
The CSS code
</h5>

<p>Since this code is lengthy, I will show it to you step by step!<br/></p>

<div class="highlight" readability="7"><pre class="highlight css"><code><span class="nc">.grid</span> <span class="p">{</span>
<span class="nl">display</span><span class="p">:</span> <span class="n">grid</span><span class="p">;</span>
<span class="py">justify-items</span><span class="p">:</span> <span class="nb">center</span><span class="p">;</span>
<span class="nl">align-content</span><span class="p">:</span> <span class="nb">center</span><span class="p">;</span>
<span class="nl">height</span><span class="p">:</span> <span class="m">100vh</span><span class="p">;</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">100vw</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div>

<p>Lets first center our content. We are doing this with css <code>grid</code>. We will cover the <code>grid</code> feature in another CSS quickies!<br/></p>

<div class="highlight" readability="29"><pre class="highlight plaintext"><code>:root {
/ light /
--c-light-background: linear-gradient(-225deg, #E3FDF5 0%, #FFE6FA 100%);
--c-light-checkbox: #fce100;
/ dark /
--c-dark-background:linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.15) 100%), radial-gradient(at top center, rgba(255,255,255,0.40) 0%, rgba(0,0,0,0.40) 120%) #989898;
--c-dark-checkbox: #757575;
}
</code></pre></div>

<p>This is a lot of code and numbers but actually we are not doing much here. We are preparing our custom properties to be used for our theme. <code>--c-dark-</code> and <code>--c-light-</code> is what I have chosen to prefix my custom properties. We have defined a light and a dark theme here. For our example we just need the <code>checkbox</code> color and the <code>background</code> property which is a gradient in our demo.<br/></p>

<div class="highlight" readability="11"><pre class="highlight css"><code><span class="nc">.theme-container</span> <span class="p">{</span>
<span class="py">--c-background</span><span class="p">:</span> <span class="n">var</span><span class="p">(</span><span class="n">--c-dark-background</span><span class="p">);</span>
<span class="py">--c-checkbox</span><span class="p">:</span> <span class="n">var</span><span class="p">(</span><span class="n">--c-dark-checkbox</span><span class="p">);</span>
<span class="nl">background</span><span class="p">:</span> <span class="n">var</span><span class="p">(</span><span class="n">--c-background</span><span class="p">);</span>
<span class="py">background-blend-mode</span><span class="p">:</span> <span class="n">multiply</span><span class="p">,</span><span class="n">multiply</span><span class="p">;</span>
<span class="nl">transition</span><span class="p">:</span> <span class="m">0.4s</span><span class="p">;</span>
<span class="p">}</span>
<span class="nc">.theme-container.light</span> <span class="p">{</span>
<span class="py">--c-background</span><span class="p">:</span> <span class="n">var</span><span class="p">(</span><span class="n">--c-light-background</span><span class="p">);</span>
<span class="py">--c-checkbox</span><span class="p">:</span> <span class="n">var</span><span class="p">(</span><span class="n">--c-light-checkbox</span><span class="p">);</span>
<span class="nl">background</span><span class="p">:</span> <span class="n">var</span><span class="p">(</span><span class="n">--c-background</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div>

<p>Here comes an integral part of the code. We now see why we named the <code>.theme-container</code> How we did. It is our entrance to have now global custom variables. We don't want to use the specific custom variables. What we want is to use global custom variables. This is why we are setting <code>--c-background</code>. From now on, we will only use our global custom variables. Then we are setting the <code>background</code>.<br/></p>

<div class="highlight" readability="9"><pre class="highlight css"><code><span class="nc">.demo</span> <span class="p">{</span>
<span class="nl">font-size</span><span class="p">:</span> <span class="m">32px</span><span class="p">;</span>
<span class="p">}</span>

<span class="c">/ The switch - the box around the slider /</span>
<span class="nc">.switch</span> <span class="p">{</span>
<span class="nl">position</span><span class="p">:</span> <span class="nb">relative</span><span class="p">;</span>
<span class="nl">display</span><span class="p">:</span> <span class="n">inline-block</span><span class="p">;</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">60px</span><span class="p">;</span>
<span class="nl">height</span><span class="p">:</span> <span class="m">34px</span><span class="p">;</span>
<span class="p">}</span>

<span class="c">/ Hide default HTML checkbox /</span>
<span class="nc">.switch</span> <span class="nc">.theme-switcher</span> <span class="p">{</span>
<span class="nl">opacity</span><span class="p">:</span> <span class="m">0</span><span class="p">;</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">0</span><span class="p">;</span>
<span class="nl">height</span><span class="p">:</span> <span class="m">0</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div>

<p>This is just some boilerplate code to set our style. In the <code>.demo</code> selector, we are setting the <code>font-size</code>. This is the size of our symbols for the toggle. In the <code>.switch</code> selector the <code>height</code> and <code>width</code> is how long and wide the element behind our toggle symbol is.<br/></p>

<div class="highlight" readability="10"><pre class="highlight css"><code><span class="c">/ The slider /</span>
<span class="nc">.slider</span> <span class="p">{</span>
<span class="nl">position</span><span class="p">:</span> <span class="nb">absolute</span><span class="p">;</span>
<span class="nl">cursor</span><span class="p">:</span> <span class="nb">pointer</span><span class="p">;</span>
<span class="nl">top</span><span class="p">:</span> <span class="m">0</span><span class="p">;</span>
<span class="nl">left</span><span class="p">:</span> <span class="m">0</span><span class="p">;</span>
<span class="nl">right</span><span class="p">:</span> <span class="m">0</span><span class="p">;</span>
<span class="nl">bottom</span><span class="p">:</span> <span class="m">0</span><span class="p">;</span>
<span class="nl">background-color</span><span class="p">:</span> <span class="n">var</span><span class="p">(</span><span class="n">--c-checkbox</span><span class="p">);</span>
<span class="nl">transition</span><span class="p">:</span> <span class="m">0.4s</span><span class="p">;</span>
<span class="p">}</span>

<span class="nc">.slider</span><span class="nd">:before</span> <span class="p">{</span>
<span class="nl">position</span><span class="p">:</span> <span class="nb">absolute</span><span class="p">;</span>
<span class="nl">content</span><span class="p">:</span> <span class="s1">"๐ŸŒ‘"</span><span class="p">;</span>
<span class="nl">height</span><span class="p">:</span> <span class="m">0px</span><span class="p">;</span>
<span class="nl">width</span><span class="p">:</span> <span class="m">0px</span><span class="p">;</span>
<span class="nl">left</span><span class="p">:</span> <span class="m">-10px</span><span class="p">;</span>
<span class="nl">top</span><span class="p">:</span> <span class="m">16px</span><span class="p">;</span>
<span class="nl">line-height</span><span class="p">:</span> <span class="m">0px</span><span class="p">;</span>
<span class="nl">transition</span><span class="p">:</span> <span class="m">0.4s</span><span class="p">;</span>
<span class="p">}</span>

<span class="nc">.theme-switcher</span><span class="nd">:checked</span> <span class="o">+</span> <span class="nc">.slider</span><span class="nd">:before</span> <span class="p">{</span>
<span class="nl">left</span><span class="p">:</span> <span class="m">4px</span><span class="p">;</span>
<span class="nl">content</span><span class="p">:</span> <span class="s1">"๐ŸŒž"</span><span class="p">;</span>
<span class="nl">transform</span><span class="p">:</span> <span class="n">translateX</span><span class="p">(</span><span class="m">26px</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div>

<p>Here we can finally see our custom properties in action besides using them directly in the <code>.theme.container</code> and again a lot of boilerplate code. As you can see, the toggle symbols are simple Unicode symbols. This is why the toggle will look different on every OS and mobile phone vendor. You have to keep this in mind. Important to know here is that in the <code>.slider:before</code> Selector, we are moving our symbol around with the <code>left</code> and <code>top</code> properties. We are doing that also in the <code>.theme-switcher:checked + .slider:before</code> but only with the <code>left</code> property.<br/></p>

<div class="highlight" readability="7"><pre class="highlight css"><code><span class="c">/ Rounded sliders /</span>
<span class="nc">.slider.round</span> <span class="p">{</span>
<span class="nl">border-radius</span><span class="p">:</span> <span class="m">34px</span><span class="p">;</span>
<span class="p">}</span>
</code></pre></div>

<p>This again is just for styling. To make our switch rounded on the corners.</p>

<p>That is it! We now have a theme switcher which is extendable. โœŒ๐Ÿ˜€</p>

<p>It would help me if you could do the following for me!<br/>Go to <a href="https://twitch.tv/lampewebdev" style="color: inherit; text-decoration: none;" name="readabilityLink-4">Twitch</a><a href="#readabilityFootnoteLink-4" class="readability-DoNotFootnote" style="color: inherit;"><small><sup>[4]</sup></small></a> and leave a follow for me! If just a few people would do that, then this would mean the world to me! โคโคโค๐Ÿ˜Š</p>

<p><strong>๐Ÿ‘‹Say Hallo!</strong> <a href="https://www.instagram.com/lampewebdev/" style="color: inherit; text-decoration: none;" name="readabilityLink-5">Instagram</a> | <a href="https://twitter.com/lampewebdev" style="color: inherit; text-decoration: none;" name="readabilityLink-6">Twitter</a> | <a href="https://www.linkedin.com/in/michael-lazarski-25725a87" style="color: inherit; text-decoration: none;" name="readabilityLink-7">LinkedIn</a> | <a href="https://medium.com/@lampewebdevelopment" style="color: inherit; text-decoration: none;" name="readabilityLink-8">Medium</a> | <a href="https://dev.to/twitchlivestreams/lampewebdev" style="color: inherit; text-decoration: none;" name="readabilityLink-9">Twitch</a> | <a href="https://www.youtube.com/channel/UCYCe4Cnracnq91J0CgoyKAQ" style="color: inherit; text-decoration: none;" name="readabilityLink-10">YouTube</a><a href="#readabilityFootnoteLink-5" class="readability-DoNotFootnote" style="color: inherit;"><small><sup>[5]</sup></small></a><a href="#readabilityFootnoteLink-6" class="readability-DoNotFootnote" style="color: inherit;"><small><sup>[6]</sup></small></a><a href="#readabilityFootnoteLink-7" class="readability-DoNotFootnote" style="color: inherit;"><small><sup>[7]</sup></small></a><a href="#readabilityFootnoteLink-8" class="readability-DoNotFootnote" style="color: inherit;"><small><sup>[8]</sup></small></a><a href="#readabilityFootnoteLink-9" class="readability-DoNotFootnote" style="color: inherit;"><small><sup>[9]</sup></small></a><a href="#readabilityFootnoteLink-10" class="readability-DoNotFootnote" style="color: inherit;"><small><sup>[10]</sup></small></a></p>

</div><div id="readability-footnotes"><h3>References</h3><ol id="readability-footnotes-list"><li><small><sup><a href="#readabilityLink-1" title="Jump to Link in Article">^</a></sup></small> <a href="https://www.instagram.com/lampewebdev/" name="readabilityFootnoteLink-1">Instagram</a><small> (www.instagram.com)</small></li><li><small><sup><a href="#readabilityLink-2" title="Jump to Link in Article">^</a></sup></small> <a href="https://twitter.com/lampewebdev" name="readabilityFootnoteLink-2">Twitter</a><small> (twitter.com)</small></li><li><small><sup><a href="#readabilityLink-3" title="Jump to Link in Article">^</a></sup></small> <a href="https://www.twitch.tv/lampewebdev/" name="readabilityFootnoteLink-3">twitch.tv</a><small> (www.twitch.tv)</small></li><li><small><sup><a href="#readabilityLink-4" title="Jump to Link in Article">^</a></sup></small> <a href="https://twitch.tv/lampewebdev" name="readabilityFootnoteLink-4">Twitch</a><small> (twitch.tv)</small></li><li><small><sup><a href="#readabilityLink-5" title="Jump to Link in Article">^</a></sup></small> <a href="https://www.instagram.com/lampewebdev/" name="readabilityFootnoteLink-5">Instagram</a><small> (www.instagram.com)</small></li><li><small><sup><a href="#readabilityLink-6" title="Jump to Link in Article">^</a></sup></small> <a href="https://twitter.com/lampewebdev" name="readabilityFootnoteLink-6">Twitter</a><small> (twitter.com)</small></li><li><small><sup><a href="#readabilityLink-7" title="Jump to Link in Article">^</a></sup></small> <a href="https://www.linkedin.com/in/michael-lazarski-25725a87" name="readabilityFootnoteLink-7">LinkedIn</a><small> (www.linkedin.com)</small></li><li><small><sup><a href="#readabilityLink-8" title="Jump to Link in Article">^</a></sup></small> <a href="https://medium.com/@lampewebdevelopment" name="readabilityFootnoteLink-8">Medium</a><small> (medium.com)</small></li><li><small><sup><a href="#readabilityLink-9" title="Jump to Link in Article">^</a></sup></small> <a href="https://dev.to/twitchlivestreams/lampewebdev" name="readabilityFootnoteLink-9">Twitch</a><small> (dev.to)</small></li><li><small><sup><a href="#readabilityLink-10" title="Jump to Link in Article">^</a></sup></small> <a href="https://www.youtube.com/channel/UCYCe4Cnracnq91J0CgoyKAQ" name="readabilityFootnoteLink-10">YouTube</a><small> (www.youtube.com)</small></li></ol></div>

keywords software development, inclusive, community,engineering,webdev, css, javascript, beginners

No Items Found.

Add Comment
Type in a Nick Name here
 
Other Items in webdev
Hugo Font Awesome Icons [ Icons ] - CSS Bundle Daily Dev Tips CSS Background Patterns by MagicPattern GitHub - ganlanyuan/tiny-slider: Vanilla javascript slider for all purposes. GitHub - jonasstrehle/supercookie: โš ๏ธ Browser fingerprinting via favicon! URL-encoder for SVG Bootstrap Icons ยท Official open source SVG icon library for Bootstrap GitHub - kognise/water.css: A drop-in collection of CSS styles to make simple websites just a little nicer Toggle light and dark themes in Bootstrap - DEV Deploy your Publish website for free on GitHub Pages - DEV Bootstrap ยท The most popular HTML, CSS, and JS library in the world. GitHub - diegocard/awesome-html5: A curated list of awesome HTML5 resources Fixing PHP SQLite database is locked warning - Unable to execute statement: database is locked [ php ] - KruXoR openstreetmap.org 50 Developer tools to make your life a little easier https://www.mrlacey.com/2020/07/youve-only-added-two-lines-why-did-that.html?m=1 GitHub - ForEvolve/bootstrap-dark: Bootstrap 4 dark theme that supports togging dark/light themes as well. There is no fluff, it changes the color of Bootstrap and that's it, no new thing to learn or unlearn, just Bootstrap, but Dark! Responsive Web Design Online Testing - isResponsive Trianglify.io ยท Low Poly Pattern Generator Grid.js - Advanced table plugin HEAD - A free guide to <head> elements Roots | Modern WordPress Development Tools A Local Dev Tool For Every Project | Lando new.css Synchronized responsive testing, development, inspection |ย Vanamco Gold Price Charts Widgets | GoldBroker.com Trianglify.io ยท Low Poly Pattern Generator Special tags that Google understands - Search Console Help 404 Error Page Codepen ScrollMagic โ™ฅ Demo AOS - Animate on scroll library Font Awesome v4.7.0 - Icon Search Tool Carbon Offers โ€” LowEndTalk Featherlight โ€“ The ultra slim jQuery lightbox. Tailwind CSS - A Utility-First CSS Framework for Rapidly Building Custom Designs HEAD - A free guide to <head> elements API Blueprint | API Blueprint Filtering Data Client-Side: Comparing CSS, jQuery, and React | CSS-Tricks CSS Quickies: CSS Variables - Or how you create a ๐ŸŒžwhite/๐ŸŒ‘dark theme easily - DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป Responsive Slider Timeline Colormind - the AI powered color palette generator Get Waves โ€“ Create SVG waves for your next design Nuxt.js - The Vue.js Framework CodeSandbox: Online Code Editor Tailored for Web Application Development Hover.css - A collection of CSS3 powered hover effects Live.js - One script closer to Designing in the Browser Color this sofa! โ€“ SVG + Blend Mode trick You Might Not Need jQuery
Search Linx
Search Linx by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

You could also follow me on twitter. I have a couple of youtube channels if you want to see some video related content. RuneScape 3, Minecraft and also a coding channel here Web Dev.

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. โ˜•

โค๏ธ๐Ÿ‘ฉโ€๐Ÿ’ป๐ŸŽฎ

๐Ÿชฆ 2000 - 16 Oct 2022 - Boots
Random Quote
I believe that success can be measured in the number of uncomfortable conversations you're willing to have.
Unknown
Latest News
## ๐Ÿš€ AI Giants Hit Bullseye: Anthropic & OpenAI Achieve Product-Market Fit Anthropic and OpenAI have reached a significant milestone, finding product-market fit with their AI technologies, which means their products effectively meet the needs of their customers, driving growth and adoption. This achievement showcases the practical value of their innovations, enabling businesses and individuals to leverage AI for enhanced productivity and efficiency. With this alignment of product and market needs, these companies are poised to transform industries and shape the future of technology.