<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Sridhar Murali</title>
    <description>The latest articles on Forem by Sridhar Murali (@freakyspeedster).</description>
    <link>https://forem.com/freakyspeedster</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F927333%2Fca9e3128-98e6-477f-8bd2-8a50880de381.png</url>
      <title>Forem: Sridhar Murali</title>
      <link>https://forem.com/freakyspeedster</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/freakyspeedster"/>
    <language>en</language>
    <item>
      <title>Decoding the Browser: How Your App Loads, Parses, and Paints</title>
      <dc:creator>Sridhar Murali</dc:creator>
      <pubDate>Mon, 14 Jul 2025 04:41:29 +0000</pubDate>
      <link>https://forem.com/freakyspeedster/decoding-the-browser-how-your-app-loads-parses-and-paints-4mjd</link>
      <guid>https://forem.com/freakyspeedster/decoding-the-browser-how-your-app-loads-parses-and-paints-4mjd</guid>
      <description>&lt;p&gt;Ever wonder what &lt;em&gt;really&lt;/em&gt; happens behind the scenes when you hit Enter in the address bar and your Single Page Application magically appears?&lt;br&gt;&lt;br&gt;
Let's pull back the curtain and walk through it step by step, from how the browser chews up your HTML to how your JavaScript bundle brings everything to life. I'm keeping it a bit high level for easier understanding. &lt;/p&gt;


&lt;h2&gt;
  
  
  1️⃣ The Browser Grabs Your HTML
&lt;/h2&gt;

&lt;p&gt;When you type in a URL and hit Enter:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The browser fires off an HTTP request to your server.&lt;/li&gt;
&lt;li&gt;The server responds with your main &lt;code&gt;index.html&lt;/code&gt; file.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Usually, this file is pretty minimal, something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;My SPA&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;link&lt;/span&gt; &lt;span class="na"&gt;rel=&lt;/span&gt;&lt;span class="s"&gt;"stylesheet"&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"/styles.css"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"root"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script &lt;/span&gt;&lt;span class="na"&gt;src=&lt;/span&gt;&lt;span class="s"&gt;"/bundle.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2️⃣ HTML Parsing &amp;amp; DOM Building
&lt;/h2&gt;

&lt;p&gt;The browser doesn't wait around—it starts parsing the HTML as soon as it starts receiving it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The HTML parser reads the markup and turns it into tokens.&lt;/li&gt;
&lt;li&gt;Those tokens get stitched together into the DOM tree.&lt;/li&gt;
&lt;li&gt;For example, &lt;code&gt;&amp;lt;div id="root"&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt; becomes a node in memory.&lt;/li&gt;
&lt;li&gt;If it hits &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; tags without defer or async, parsing pauses while that script runs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At this point:&lt;br&gt;
✅ The DOM is taking shape&lt;br&gt;&lt;br&gt;
✅ No styles are applied yet&lt;br&gt;&lt;br&gt;
✅ No JavaScript has run&lt;/p&gt;

&lt;h2&gt;
  
  
  3️⃣ CSSOM: Making Things Pretty
&lt;/h2&gt;

&lt;p&gt;When the parser comes across your &lt;code&gt;&amp;lt;link rel="stylesheet"&amp;gt;&lt;/code&gt; tags:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The browser fetches the CSS files.&lt;/li&gt;
&lt;li&gt;It parses them into the CSS Object Model (CSSOM).&lt;/li&gt;
&lt;li&gt;Your app won't render anything until both DOM and CSSOM are ready.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4️⃣ Building the Render Tree &amp;amp; Painting
&lt;/h2&gt;

&lt;p&gt;Once both the DOM and CSSOM are good to go:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The browser combines them into a Render Tree, which figures out what should be visible on the page.&lt;/li&gt;
&lt;li&gt;It calculates layout.&lt;/li&gt;
&lt;li&gt;Then it paints pixels to the screen.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5️⃣ Your JavaScript Bundle Arrives
&lt;/h2&gt;

&lt;p&gt;The bundle is downloaded via &lt;code&gt;&amp;lt;script src="/bundle.js"&amp;gt;&lt;/code&gt;. If it's defer, it waits until parsing finishes. Then the JavaScript starts running.&lt;/p&gt;

&lt;h2&gt;
  
  
  6️⃣ Webpack Bootstraps Your App
&lt;/h2&gt;

&lt;p&gt;When the browser loads your JavaScript bundle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Webpack's runtime kicks in&lt;/strong&gt;—a small piece of code that knows how to load and execute your modules.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;All modules are wrapped as functions&lt;/strong&gt; and stored in an object (&lt;code&gt;{ id: fn }&lt;/code&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;It uses a &lt;code&gt;__webpack_require__&lt;/code&gt; function to:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Load the entry module (like &lt;code&gt;index.js&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Resolve its dependencies recursively&lt;/li&gt;
&lt;li&gt;Cache modules so they only run once&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Then it executes the entry module&lt;/strong&gt;, which usually renders your app.&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Think of it as:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🧳 Your app code = packed luggage&lt;/li&gt;
&lt;li&gt;🧠 Webpack runtime = the guy who knows what bag to open and in what order&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7️⃣ Initializing Your SPA
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;ReactDOM&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react-dom&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./App&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;ReactDOM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getElementById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;root&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This mounts the app into the DOM and sets up routing.&lt;/p&gt;

&lt;h2&gt;
  
  
  8️⃣ Client-Side Routing Takes Over
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Routing happens via JS (history.pushState)&lt;/li&gt;
&lt;li&gt;Views are swapped without a full reload&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  9️⃣ Hydration (If Using SSR)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pre-rendered HTML comes from server&lt;/li&gt;
&lt;li&gt;JS attaches interactivity&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🧠 Quick Recap
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Request&lt;/strong&gt;: Get HTML&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parse&lt;/strong&gt;: DOM + CSSOM&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Render&lt;/strong&gt;: Layout + Paint&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JS&lt;/strong&gt;: Bundle executes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;App&lt;/strong&gt;: Mounts and routes&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  ⚡ Why This Matters
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Helps optimize load performance&lt;/li&gt;
&lt;li&gt;Debug layout/paint issues&lt;/li&gt;
&lt;li&gt;Improve time to interactive&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🔥 Pro Tip: Use Chrome DevTools to watch this in action
&lt;/h2&gt;

&lt;p&gt;🙌 That's the flow—now you know what's really happening when your SPA boots up.&lt;/p&gt;

</description>
      <category>browser</category>
      <category>javascript</category>
      <category>performance</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Creating a modern animated cursor for your website</title>
      <dc:creator>Sridhar Murali</dc:creator>
      <pubDate>Thu, 28 Mar 2024 11:00:24 +0000</pubDate>
      <link>https://forem.com/freakyspeedster/creating-a-modern-animated-cursor-for-your-website-1f83</link>
      <guid>https://forem.com/freakyspeedster/creating-a-modern-animated-cursor-for-your-website-1f83</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
In this article, we'll learn how to create a simple yet engaging effect where a circle follows the mouse cursor on a web page. This effect can be used to add interactivity and visual appeal to your website. We'll achieve this using HTML, CSS, and JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Step 1&lt;/em&gt;: Setting Up the basic HTML Structure&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;title&amp;gt;Random HTML Content&amp;lt;/title&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;div id="circleId" class="circle"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;h1&amp;gt;Random HTML Content&amp;lt;/h1&amp;gt;
  &amp;lt;div class="random"&amp;gt;
    &amp;lt;p&amp;gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vestibulum magna id quam mollis, eu porttitor dolor hendrerit. Curabitur vestibulum, neque id molestie blandit, nisl orci hendrerit ligula, et tristique risus odio nec metus. Nulla facilisi.&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;Phasellus eget mi vel mauris luctus lacinia. Donec eget interdum eros. Fusce in est enim. Vivamus et enim vehicula, ultricies felis sit amet, bibendum nunc. Donec eget tristique mi.&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;Suspendisse potenti. Nulla facilisi. Vivamus eu justo vel odio faucibus facilisis. Morbi tempus arcu sit amet libero rutrum dictum. Nam id justo sed felis auctor lacinia. Sed nec mauris nec tellus scelerisque interdum.&amp;lt;/p&amp;gt;
    &amp;lt;p&amp;gt;Nunc dignissim lorem ac libero rutrum, a fermentum arcu convallis. Nullam sed justo in ligula iaculis ultrices. Suspendisse luctus justo eget arcu dapibus, et blandit libero ultricies. In vulputate leo vel elit ultricies ultricies.&amp;lt;/p&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Step 2&lt;/em&gt;: Styling the Circle with CSS&lt;br&gt;
Now, let's style our circle to make it visually appealing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.circle {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #007bff;
  pointer-events: none;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Explanation&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We position the circle in the center of the viewport using absolute positioning and &lt;code&gt;transform: translate(-50%, -50%)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The circle has a width and height of 50 pixels and a &lt;code&gt;border-radius&lt;/code&gt; of &lt;code&gt;50%&lt;/code&gt; to make it round.&lt;/li&gt;
&lt;li&gt;We set pointer-events: none; to ensure that the circle does not interfere with mouse interactions with other elements.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;Step 3&lt;/em&gt;: Adding JavaScript Functionality&lt;br&gt;
Next, let's add JavaScript code to make the circle follow the mouse cursor.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const circle = document.getElementById('circle');
document.addEventListener('mousemove', (e) =&amp;gt; {
  circle.style.left = `${e.clientX}px`;
  circle.style.top = `${e.clientY}px`;
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Explanation&lt;/strong&gt;:&lt;br&gt;
We select the circle element using its ID circle.&lt;br&gt;
We add a mousemove event listener to the document.&lt;br&gt;
Inside the event listener, we update the left and top CSS properties of the circle element to match the current mouse cursor position.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Another tip&lt;/strong&gt;: &lt;br&gt;
To hide your cursor completely add this line to the &lt;code&gt;circle&lt;/code&gt; class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cursor: none;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;:&lt;br&gt;
Congratulations! You've successfully created an animated circle that follows the mouse cursor. You can further customize the appearance and behaviour of the circle to fit your project's requirements. Experiment with different sizes, colors, and animation effects to make it unique!&lt;/p&gt;

&lt;p&gt;Here's a codepen link to see it in action:&lt;br&gt;
&lt;a href="https://codepen.io/Sridhar-Murali/pen/poBrBEM" rel="noopener noreferrer"&gt;https://codepen.io/Sridhar-Murali/pen/poBrBEM&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>css</category>
      <category>animation</category>
    </item>
    <item>
      <title>Created a realistic moon using just CSS</title>
      <dc:creator>Sridhar Murali</dc:creator>
      <pubDate>Wed, 18 Oct 2023 15:08:47 +0000</pubDate>
      <link>https://forem.com/freakyspeedster/created-a-realistic-moon-using-just-css-38c5</link>
      <guid>https://forem.com/freakyspeedster/created-a-realistic-moon-using-just-css-38c5</guid>
      <description>&lt;p&gt;Yes, I created a realistic moon using just CSS. &lt;br&gt;
Let's dive right into the step by step process. &lt;/p&gt;

&lt;p&gt;Add a div element into your HTML file and give a class name. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;div class="animated-moon"&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now let's start the craft using CSS:&lt;br&gt;
Start out by giving a basic shape to the element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  width: 20rem;
  height: 20rem;
  position: absolute;
  border-radius: 50%;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's an image from &lt;a href="https://www.solarsystemscope.com/textures/" rel="noopener noreferrer"&gt;Solar System Scope&lt;/a&gt; with a moon texture : &lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.solarsystemscope.com/textures/download/2k_moon.jpg" rel="noopener noreferrer"&gt;https://www.solarsystemscope.com/textures/download/2k_moon.jpg&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add this as background image for your element and give a background size a little extra for the X axis rotation to be possible.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;background-image: url('https://www.solarsystemscope.com/textures/download/2k_moon.jpg')
background-size: 110% 100%;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The moment has come to craft an animation that spins and dazzles.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@keyframes moonRotation {
    0% { background-position: 0% 0%; }
    50% { background-position: 150% 0%; }
    100% { background-position: 300% 0%; }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add this code to your &lt;code&gt;.animated-moon&lt;/code&gt; class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;animation-name: moonRotation;
animation-duration: 15s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-fill-mode: forwards !important;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, your moon would look something like this&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7xtcqb05wky9mj3z9873.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7xtcqb05wky9mj3z9873.png" alt="Image description" width="778" height="740"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, all your gotta do is unleash the superstar potential of the box-shadow property to create a stellar 3D effect for the moon.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;box-shadow: inset -10px 8px 6px -5px #ffffff, // Shine of light hitting on the moon (top right )
inset 20px -20px 50px 43px rgba(0, 0, 0, 0.9), // Shadow regions on moon
7px -6px 14px rgba(255, 255, 255, 0.3215686275); // Glow outside the moon for light reflection
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Final Output&lt;/strong&gt; &lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frhtsv53fxkgbqjgqxkme.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frhtsv53fxkgbqjgqxkme.png" alt="Image description" width="764" height="764"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's a codepen link to play around : &lt;a href="https://codepen.io/Sridhar-Murali/pen/yLGmNbb?editors=1100" rel="noopener noreferrer"&gt;https://codepen.io/Sridhar-Murali/pen/yLGmNbb?editors=1100&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks for your time&lt;br&gt;
Sridhar&lt;/p&gt;

</description>
      <category>css</category>
      <category>animation</category>
      <category>frontend</category>
      <category>design</category>
    </item>
    <item>
      <title>UI/ UX - Design Decisions - Perspective</title>
      <dc:creator>Sridhar Murali</dc:creator>
      <pubDate>Fri, 18 Nov 2022 09:17:21 +0000</pubDate>
      <link>https://forem.com/freakyspeedster/ui-ux-design-decisions-perspective-301f</link>
      <guid>https://forem.com/freakyspeedster/ui-ux-design-decisions-perspective-301f</guid>
      <description>&lt;p&gt;I am a frontend developer and an Ex-QA. I am just here to share some takeaways on UI/UX from my experience. &lt;/p&gt;

&lt;p&gt;Most of the times we keep arguing with our collegues about the best user experience for our product. We generally go with the decision which is agreed upon by most number or just our product manager. :D&lt;/p&gt;

&lt;p&gt;Here's a truth, you might not be wrong about your idea of UX for the feature. We keep missing on one key point. Its called Perspective.&lt;/p&gt;

&lt;p&gt;We need to be open and vocal about why we feel so about the UX of a certain feature. Dont go with stretched conversations and arguments on whose perspective is right, instead support your points with some facts from experience or some online content based on user's perspective. When the other person's perspective seems more apt for the feature, then go ahead with it. There is no need to feel invalidated. Learn from this and gain a better perspective for UX. &lt;/p&gt;

&lt;p&gt;Where we go wrong generally ? &lt;br&gt;
While taking decisions for a new feature which is going to be a part of a huge enterprise product. &lt;/p&gt;

&lt;p&gt;There are two points which would make sense here.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;For a user who is already familiar with UX of such huge product, discoverability of a new feature will never be a problem. Just make some minor announcements with popovers/ notification badges like Slack does. We make the biggest mistake by bringing in most of the features onto the top level and making the UI more clumsy just for the sake of discoverability. Navigations to the feature must be given more importance. &lt;/li&gt;
&lt;li&gt;Stop thinking that your users are dumb. We need not think from a layman's perspective for UI/UX of every new feature. A few more clicks would actually make sense and makes the UX enjoyable to the user. Think very clearly before you take this decision. If this is the most prominent feature of your product, then you might have to reconsider this point. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;These points were hard hitting for me when a fellow designer pointed out. Its actually true. In this digital era, we need to stop thinking that our users are dumb. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ux</category>
      <category>uiux</category>
      <category>design</category>
    </item>
  </channel>
</rss>
