<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Gorithm]]></title><description><![CDATA[Using no way as way, and nothings as all things]]></description><link>https://gorithm.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Tue, 01 Sep 2026 12:52:53 GMT</lastBuildDate><atom:link href="https://gorithm.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Transparentizing HTML Elements using CSS Only Part 1]]></title><description><![CDATA[Introduction :
Gorithm is here 👋
Transparentizing (creating a transparency) an element, whether it's html element or even a fontawesome icon, or a logo, could be a frustrating process if you don't understand what you are trying to do or what you'll ...]]></description><link>https://gorithm.hashnode.dev/transparentizing-html-elements-using-css-only-part-1</link><guid isPermaLink="true">https://gorithm.hashnode.dev/transparentizing-html-elements-using-css-only-part-1</guid><category><![CDATA[CSS]]></category><category><![CDATA[HTML5]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Frontend Development]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[frontend]]></category><category><![CDATA[Tutorial]]></category><category><![CDATA[webdev]]></category><category><![CDATA[Developer]]></category><category><![CDATA[Design]]></category><category><![CDATA[UI]]></category><category><![CDATA[UX]]></category><category><![CDATA[landing page]]></category><category><![CDATA[CSS3]]></category><dc:creator><![CDATA[Gorithm]]></dc:creator><pubDate>Mon, 26 Feb 2024 13:01:10 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708948526397/2646e8ff-c401-4b59-9559-23e9119bcd5a.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction">Introduction :</h2>
<p><a target="_blank" href="https://www.youtube.com/@gorithm">Gorithm</a> is here 👋</p>
<p>Transparentizing (creating a transparency) an element, whether it's html element or even a fontawesome icon, or a logo, could be a frustrating process if you don't understand what you are trying to do or what you'll have to deal with.</p>
<h2 id="heading-how-this-series-is-about">How this series is about ?</h2>
<p>This Article is the First Part of a 3-parts series that I managed to write about my experience with transparentizing HTML elements using CSS only approach, <strong>First part</strong> deals with the usage of mix-blend-mode and understanding the difference between each blending mode and how it affects the the overall process of transparentizing and apply this on creating the design of this Article's Cover in action. <strong>Second part</strong> will deal with implementation of a blurry backdrop beneath the transparent element and how to apply different blend modes and get different results that suits various cases. <strong>Third part</strong> will deal with Transparent Element's Coloring and using any color as it's background, stroke, or a shadow also it will include implementing animations</p>
<hr />
<h2 id="heading-breakdown">Breakdown :</h2>
<p>Assume you have a pre-written markup or some basic markup that I'm going to write down here, just make sure that:</p>
<ul>
<li><p>Targeted element must have a parent that includes it only, something like a wrapper or a container to it,</p>
</li>
<li><p>Parent background color must be the same as the targeted element</p>
</li>
<li><p>You can clip the targeted element to it's background if you want to apply any kind of background-image, but for this first part make sure it's white or black</p>
</li>
</ul>
<hr />
<h3 id="heading-basic-markup-implementation"><strong>Basic Markup Implementation:</strong></h3>
<p>Notice the class names that clarify the relation between the elements</p>
<pre><code class="lang-xml"><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">http-equiv</span>=<span class="hljs-string">"X-UA-Compatible"</span> <span class="hljs-attr">content</span>=<span class="hljs-string">"IE=edge"</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.0"</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>css-transparent-text<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">style</span>&gt;</span><span class="css">
    <span class="hljs-comment">/* The magic happens here */</span>
    </span><span class="hljs-tag">&lt;/<span class="hljs-name">style</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> <span class="hljs-attr">class</span>=<span class="hljs-string">"parent"</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">span</span> <span class="hljs-attr">class</span>=<span class="hljs-string">"child"</span>&gt;</span>
            Transparent
            <span class="hljs-tag">&lt;<span class="hljs-name">br</span>&gt;</span>
            Text
        <span class="hljs-tag">&lt;/<span class="hljs-name">span</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">h1</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>
<hr />
<h3 id="heading-basic-css-implementation"><strong>Basic CSS Implementation:</strong></h3>
<p>Just a basic CSS that normalizes the markup, and assigns a fixed cover background image to the document's body</p>
<pre><code class="lang-css">* {
            <span class="hljs-attribute">margin</span>: <span class="hljs-number">0</span>;
            <span class="hljs-attribute">padding</span>: <span class="hljs-number">0</span>;
            <span class="hljs-attribute">box-sizing</span>: border-box;
        }

        <span class="hljs-selector-tag">body</span> {
            <span class="hljs-attribute">min-height</span>: <span class="hljs-number">100vh</span>;
            <span class="hljs-attribute">background-image</span>:
                <span class="hljs-built_in">url</span>(https://images.unsplash.com/photo-<span class="hljs-number">1516528387618</span>-afa90b13e000?q=<span class="hljs-number">80</span>&amp;w=<span class="hljs-number">1470</span>&amp;auto=format&amp;fit=crop&amp;ixlib=rb-<span class="hljs-number">4.0</span>.<span class="hljs-number">3</span>&amp;ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%<span class="hljs-number">3</span>D%<span class="hljs-number">3</span>D);
            <span class="hljs-attribute">background-size</span>: cover;
            <span class="hljs-attribute">background-attachment</span>: fixed;
        }
</code></pre>
<h2 id="heading-trick-explanation">Trick Explanation:</h2>
<p>Assume that the parent element is white so the child element also will need to be white, then you will blend the child to difference mode, and in the mode it will invert its color which is white, and any identical pixel colors between it and it's background will become black, then you will blend the parent element as well but to a screen blend mode for lighter colors above 50% opacity or hard-light for lighter colors beneath 50% opacity, although this is not a standards that is must, actually you can try different light colors with different opacities and different modes, but those two blend modes worked best for me</p>
<pre><code class="lang-css"> <span class="hljs-selector-class">.parent</span> {
            <span class="hljs-attribute">position</span>: absolute;
            <span class="hljs-attribute">top</span>: <span class="hljs-number">0</span>;
            <span class="hljs-attribute">left</span>: <span class="hljs-number">0</span>;
            <span class="hljs-attribute">width</span>: <span class="hljs-number">50vw</span>;
            <span class="hljs-attribute">height</span>: <span class="hljs-number">100vh</span>;
            <span class="hljs-attribute">background-color</span>: <span class="hljs-built_in">rgba</span>(<span class="hljs-number">255</span> <span class="hljs-number">255</span> <span class="hljs-number">255</span> / <span class="hljs-number">1</span>);
            <span class="hljs-attribute">mix-blend-mode</span>: screen;
        }

 <span class="hljs-selector-class">.child</span> {
           <span class="hljs-attribute">position</span>: absolute;
           <span class="hljs-attribute">top</span>: <span class="hljs-number">0</span>;
           <span class="hljs-attribute">left</span>: <span class="hljs-number">0</span>;
           <span class="hljs-attribute">width</span>: <span class="hljs-number">100vw</span>;
           <span class="hljs-attribute">height</span>: <span class="hljs-number">100vh</span>;
           <span class="hljs-attribute">display</span>: grid;
           <span class="hljs-attribute">place-content</span>: center;
           <span class="hljs-attribute">font-family</span>: Poppins, sans-serif;
           <span class="hljs-attribute">font-weight</span>: <span class="hljs-number">900</span>;
           <span class="hljs-attribute">color</span>: <span class="hljs-number">#fff</span>;
           <span class="hljs-attribute">mix-blend-mode</span>: difference;
           <span class="hljs-attribute">font-size</span>: <span class="hljs-number">12vw</span>;
           <span class="hljs-attribute">text-align</span>: center;
           <span class="hljs-attribute">line-height</span>: <span class="hljs-number">1.2</span>;
        }
</code></pre>
<p><a target="_blank" href="https://youtu.be/1xEAau6hIlU?si=deBcpZOXyyB7SZ8d">Tutorial to watch and follow along</a></p>
<p><a target="_blank" href="https://www.youtube.com/@gorithm">Subscribe to Gorithms's Youtube Channel</a></p>
<p>In the next two parts, I'm going to go further in implementing the blurry backdrop as well as Difference colors usage including the opposite state of darker colors, Animation, etc. Stay tuned</p>
<p>#css #html #frontend #webdevelopment</p>
]]></content:encoded></item><item><title><![CDATA[How to create CSS Skewed Background ft. Pseudo Element]]></title><description><![CDATA[There is many ways to create a skewed background in CSS, the one I prefer is using Pseudo Element, and this because of the nature of pseudo elements in general that makes it more flexible to handle, manipulate, transform, without affecting the origin...]]></description><link>https://gorithm.hashnode.dev/how-to-create-css-skewed-background-ft-pseudo-element</link><guid isPermaLink="true">https://gorithm.hashnode.dev/how-to-create-css-skewed-background-ft-pseudo-element</guid><category><![CDATA[CSS]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[Frontend Development]]></category><category><![CDATA[UI]]></category><category><![CDATA[UX]]></category><category><![CDATA[Design]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[technology]]></category><category><![CDATA[development]]></category><dc:creator><![CDATA[Gorithm]]></dc:creator><pubDate>Sun, 18 Feb 2024 22:40:30 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708296299343/7410598c-1862-499c-b3b8-1f6201f51026.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>There is many ways to create a skewed background in CSS, the one I prefer is using Pseudo Element, and this because of the nature of pseudo elements in general that makes it more flexible to handle, manipulate, transform, without affecting the original or target element that we want to make its background skewed</p>
<p>First after adding some Markup like this:</p>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">section</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Gorithm is here<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore, quae! Voluptate esse placeat aperiam
                eos
                iusto tempore quaerat doloremque et voluptates commodi maiores consequatur corporis dolore sequi modi
                quas,
                pariatur tempora illum. In consequuntur distinctio recusandae labore, vitae consectetur sequi molestias
                illum tempore a possimus quod nihil. Adipisci, ducimus placeat.<span class="hljs-tag">&lt;/<span class="hljs-name">p</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>
            <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Gorithm is here again<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
            <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore, quae! Voluptate esse placeat aperiam
                eos
                iusto tempore quaerat doloremque et voluptates commodi maiores consequatur corporis dolore sequi modi
                quas,
                pariatur tempora illum. In consequuntur distinctio recusandae labore, vitae consectetur sequi molestias
                illum tempore a possimus quod nihil. Adipisci, ducimus placeat.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
        <span class="hljs-tag">&lt;/<span class="hljs-name">section</span>&gt;</span>
</code></pre>
<p>Then the whole trick is in the CSS, which is adding a pseudo element that takes the full width of it's parent (the target element) and some kind of its parent height and half (like 150%) and using the transform skew():</p>
<pre><code class="lang-css">  <span class="hljs-selector-tag">section</span><span class="hljs-selector-pseudo">:nth-child(1)</span><span class="hljs-selector-pseudo">::before</span> {
            <span class="hljs-attribute">content</span>: <span class="hljs-string">""</span>;
            <span class="hljs-attribute">position</span>: absolute;
            <span class="hljs-attribute">inset</span>: <span class="hljs-number">0</span>;
            <span class="hljs-attribute">top</span>: -<span class="hljs-number">50%</span>;
            <span class="hljs-attribute">height</span>: <span class="hljs-number">150%</span>;
            <span class="hljs-attribute">background-color</span>: springgreen;
            <span class="hljs-attribute">z-index</span>: -<span class="hljs-number">1</span>;
            <span class="hljs-attribute">transform</span>: <span class="hljs-built_in">skew</span>(<span class="hljs-number">0deg</span>, -<span class="hljs-number">10deg</span>);
            <span class="hljs-attribute">box-shadow</span>: <span class="hljs-number">0</span> -<span class="hljs-number">50px</span> <span class="hljs-number">100px</span> <span class="hljs-number">50px</span> transparent;
        }
</code></pre>
<p>Make sure that the parent element of the pseudo element has a position set to relative, otherwise the effect won't function well.</p>
<p>Tutorial: <a target="_blank" href="https://codepen.io/alishata/pen/ZEPPawY">here</a><br />Live Demo &amp; Code: <a target="_blank" href="https://codepen.io/alishata/pen/ZEPPawY">here</a></p>
]]></content:encoded></item><item><title><![CDATA[Create a Gradient Border with CSS [Just 2 Lines]]]></title><description><![CDATA[The Problem with border-color and border-image:
When you try to add a gradient as a property value to the border-color or to the border itself (same) you will see nothing, the border is completely vanished, this happens because CSS border property do...]]></description><link>https://gorithm.hashnode.dev/create-a-gradient-border-with-css-just-2-lines</link><guid isPermaLink="true">https://gorithm.hashnode.dev/create-a-gradient-border-with-css-just-2-lines</guid><category><![CDATA[CSS]]></category><category><![CDATA[CSS3]]></category><category><![CDATA[HTML5]]></category><category><![CDATA[HTML]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[webdev]]></category><category><![CDATA[tips]]></category><category><![CDATA[Frontend Development]]></category><category><![CDATA[frontend]]></category><category><![CDATA[gradients in CSS]]></category><category><![CDATA[#codenewbies]]></category><category><![CDATA[coding]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Gorithm]]></dc:creator><pubDate>Fri, 16 Feb 2024 01:27:18 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1708296239848/eb4903fb-8086-4219-93ac-04a5dfe69eca.avif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-the-problem-with-border-color-and-border-image">The Problem with border-color and border-image:</h2>
<p>When you try to add a gradient as a property value to the border-color or to the border itself (same) you will see nothing, the border is completely vanished, this happens because CSS border property doesn't allow gradients only allows colors, and if you tried the border-image it will do the same effect but only on rectangles, it won't respect the border-radius if you set the border-radius of the element, so the solution here must do the following:</p>
<ul>
<li><p>Make the border color to be any kind of gradient (linear, radial, conic, etc)</p>
</li>
<li><p>respect the shape of the element and its radius</p>
</li>
</ul>
<h2 id="heading-returning-to-the-roots-of-css-aka-the-box-model">Returning to the Roots of CSS aka the BOX MODEL:</h2>
<p>what is the CSS Box Model, will I could tell from experience it's concept that tells us about a BOX that wraps around every HTML element, and it consists of 4 different parts:</p>
<ol>
<li><p>Content Box: where is the initial content of the element exist, and the width and height properties applied to it.</p>
</li>
<li><p>Padding Box: Clears an area around the Content Box but still inside the element this is the difference between it and margin-box.</p>
</li>
<li><p>Border Box: the area that wraps around the Padding Box and the Content Box.</p>
</li>
<li><p>Margin Box; Clears an area around the Border Box, so it's outside of the element itself.</p>
</li>
</ol>
<h2 id="heading-implementing-the-solution">Implementing the solution</h2>
<p>We will make use of the padding-box and the border-box in creating to gradient backgrounds, first will be treated as the color of the content box so it will be a gradient of the the same color, second gradient will be treated as the color of the border, and this is the fun part of mixing colors, then you must assign the border-width to a certain value like (10px or what) and make sure it's transparent so the second background could be shown otherwise its color will cover our gradient</p>
<pre><code class="lang-css"><span class="hljs-selector-class">.element</span> {
    ...
    <span class="hljs-attribute">background</span>: 
        <span class="hljs-built_in">linear-gradient</span>(#<span class="hljs-number">222</span>, #<span class="hljs-number">222</span>),
        <span class="hljs-built_in">linear-gradient</span>(crimson, blueviolet);
    <span class="hljs-attribute">border</span>: <span class="hljs-number">10px</span> solid transparent;
}
</code></pre>
<p>Also I made a short tutorial <a target="_blank" href="https://www.youtube.com/watch?v=adjoIKgqgwM">here</a> so you could understand better</p>
]]></content:encoded></item></channel></rss>