<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by IEEE_TEMS BLOGS on Medium]]></title>
        <description><![CDATA[Stories by IEEE_TEMS BLOGS on Medium]]></description>
        <link>https://medium.com/@ieee-tems-blogs?source=rss-2b8c918acb5b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*iiNoa7LRWx0s7yD7lcDyRA.jpeg</url>
            <title>Stories by IEEE_TEMS BLOGS on Medium</title>
            <link>https://medium.com/@ieee-tems-blogs?source=rss-2b8c918acb5b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 19:50:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ieee-tems-blogs/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[React 101: What I Wish I Knew About Props, Mapping, and JSX]]></title>
            <link>https://ieee-tems-blogs.medium.com/react-101-what-i-wish-i-knew-about-props-mapping-and-jsx-10c92d2cd46e?source=rss-2b8c918acb5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/10c92d2cd46e</guid>
            <dc:creator><![CDATA[IEEE_TEMS BLOGS]]></dc:creator>
            <pubDate>Sun, 13 Jul 2025 21:56:36 GMT</pubDate>
            <atom:updated>2025-07-13T21:57:53.056Z</atom:updated>
            <content:encoded><![CDATA[<p><em>-by </em><a href="https://medium.com/u/ee379aba8b02"><em>Rakshit Bansal</em></a></p><blockquote><em>When I first touched React, I thought, “Is this JavaScript with extra spice?” Then JSX happened. Then props. Then array mapping with components. And boom — I was in the middle of a beautiful mess.</em></blockquote><p>If you’re like me — curious, a little confused, and trying to figure out where JavaScript ends and React begins — this blog is your warm cup of chai. ☕</p><h3>COMPONENTS &amp; PROPS: THE REAL STARTING LINE</h3><h3>🔹 The Smallest Building Block: A Component</h3><p>A React component is just a fancy JavaScript function that returns some HTML (okay, JSX — more on that later).</p><pre>function Welcome(props) {<br>  return &lt;h1&gt;Hello, {props.name}!&lt;/h1&gt;;<br>}<br><br>// Usage:<br>&lt;Welcome name=&quot;Rakshit&quot; /&gt;</pre><p><strong>Output:</strong></p><p>Hello, Rakshit!</p><p>Yes, that’s it. You pass stuff in using <strong>props</strong>, and read it inside using props.name.</p><h3>🔹 Props: Your Data Messengers</h3><p>Think of props as WhatsApp messages between components — small, meaningful, and always delivered.</p><pre>function Product({ name, price }) {<br>  return (<br>    &lt;div&gt;<br>      &lt;h2&gt;{name}&lt;/h2&gt;<br>      &lt;p&gt;Price: {price}&lt;/p&gt;<br>    &lt;/div&gt;<br>  );<br>}<br><br>&lt;Product name=&quot;iPhone 15&quot; price=&quot;79999&quot; /&gt;</pre><p><em>Pro Tip:</em> Destructure props when you can. Cleaner. Prettier. Just like a tidy wardrobe.</p><h3>JSX: JAVASCRIPT WITH HTML DREAMS</h3><p>JSX lets you write code that <strong>looks like HTML but behaves like JavaScript</strong>. It’s not HTML. It’s a blend — like Maggi with cheese.</p><pre>const name = &quot;React&quot;;<br>return &lt;p&gt;Welcome to {name}!&lt;/p&gt;;</pre><p><strong>Things JSX loves:</strong></p><ul><li>{} for JS expressions</li><li>One parent element (use &lt;&gt;...&lt;/&gt; if needed)</li><li>CamelCase for attributes (className, not class)</li></ul><pre>return (<br>  &lt;&gt;<br>    &lt;h1 className=&quot;heading&quot;&gt;JSX Magic&lt;/h1&gt;<br>    &lt;p&gt;{3 + 4}&lt;/p&gt;<br>  &lt;/&gt;<br>);</pre><h3>ARRAYS, OBJECTS &amp; MAPPING — THE BIG THREE IN REACT</h3><h3>🔸 Creating Arrays &amp; Objects in JS</h3><pre>const names = [&quot;abc&quot;, &quot;def&quot;, &quot;xyz&quot;]; // array<br>const trainer = { name: &quot;abc&quot;, region: &quot;delhi&quot; }; // object</pre><p>🔸 But wait… what’s an array of objects?</p><pre>const pokemons = [<br>  { name: &quot;Pikachu&quot;, type: &quot;Electric&quot; },<br>  { name: &quot;Charmander&quot;, type: &quot;Fire&quot; }<br>];</pre><p>Now this is where React shines.</p><h3>MAPPING: TURN DATA INTO COMPONENTS</h3><p>Say you have that pokemons array. You want to display each Pokémon like a card? <strong>map</strong> is your best friend.</p><pre>function PokeCard({ name, type }) {<br>  return &lt;p&gt;{name} is a {type}-type Pokémon.&lt;/p&gt;;<br>}<br><br>function App() {<br>  return (<br>    &lt;&gt;<br>      {pokemons.map((poke, index) =&gt; (<br>        &lt;PokeCard key={index} name={poke.name} type={poke.type} /&gt;<br>      ))}<br>    &lt;/&gt;<br>  );<br>}</pre><p>Yes, you’re mapping an array of objects → into React components.</p><p>Each one gets its own props.</p><h3>🔑 KEY PROP: THE INVISIBLE HERO</h3><p>Whenever you use .map(), React <strong>demands</strong> a key prop.</p><p>Why?</p><blockquote><em>So React can tell which component changed, added, or removed.</em></blockquote><blockquote><em>It’s like giving every guest in a party their own name tag.</em></blockquote><pre>{items.map((item, index) =&gt; &lt;li key={index}&gt;{item}&lt;/li&gt;)}</pre><p><strong>Avoid using </strong><strong>index if your data has something unique (like </strong><strong>id)</strong></p><h3>CONDITIONAL RENDERING — RENDER ONLY IF NEEDED</h3><p>You don’t want to show a setup line if it’s missing, right?</p><pre>function Joke({ setup, punchline }) {<br>  return (<br>    &lt;&gt;<br>      {setup &amp;&amp; &lt;p&gt;Setup: {setup}&lt;/p&gt;}<br>      &lt;p&gt;Punchline: {punchline}&lt;/p&gt;<br>    &lt;/&gt;<br>  );<br>}</pre><p>Boom. No broken empty lines. This works because false &amp;&amp; &lt;p&gt;... results in nothing.</p><h3>MINI PROJECT: JOKE LIST</h3><pre>// jokesData.js<br>export default [<br>  {setup:&quot;I got my daughter a fridge for her birthday.&quot;,<br>                punchline:&quot;I can&#39;t wait to see her face light up when she opens it.&quot; },<br>  { setup:&quot;How did the hacker escape the police?&quot;,<br>                punchline:&quot;He just ransomware!&quot; },<br>  { setup:&quot;Why don&#39;t pirates travel on mountain roads?&quot;,<br>                punchline:&quot;Scurvy.&quot; },<br>  { punchline: &quot;It’s hard to explain puns to kleptomaniacs because <br>they always take things literally.&quot; }<br>];</pre><pre>// Joke.jsx<br>export default function Joke({ setup, punchline }) {<br>  return (<br>    &lt;div className=&quot;joke-box&quot;&gt;<br>      {setup &amp;&amp; &lt;p&gt;&lt;strong&gt;Setup:&lt;/strong&gt; {setup}&lt;/p&gt;}<br>      &lt;p&gt;&lt;strong&gt;Punchline:&lt;/strong&gt; {punchline}&lt;/p&gt;<br>      &lt;hr /&gt;<br>    &lt;/div&gt;<br>  );<br>}</pre><pre>// App.jsx<br>import Joke from &quot;./Joke&quot;;<br>import jokesData from &quot;./jokesData&quot;;<br><br>function App() {<br>  return (<br>    &lt;main&gt;<br>      {jokesData.map((joke, i) =&gt; (<br>        &lt;Joke key={i} setup={joke.setup} punchline={joke.punchline} /&gt;<br>      ))}<br>    &lt;/main&gt;<br>  );<br>}</pre><p>Try deleting one setup value and see how conditional rendering saves you.</p><p>o/p:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*yrCFh9sLieqYEsIEOMtJ6w.png" /></figure><p>TABLE EXAMPLE: RENDERING OBJECTS</p><pre>const students = [<br>  { id: 1, name: &quot;Rak&quot;, marks: 89 },<br>  { id: 2, name: &quot;Krish&quot;, marks: 95 }<br>];</pre><pre>function StudentTable() {<br>  return (<br>    &lt;table border=&quot;1&quot;&gt;<br>      &lt;thead&gt;<br>        &lt;tr&gt;&lt;th&gt;ID&lt;/th&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Marks&lt;/th&gt;&lt;/tr&gt;<br>      &lt;/thead&gt;<br>      &lt;tbody&gt;<br>        {students.map((s) =&gt; (<br>          &lt;tr key={s.id}&gt;<br>            &lt;td&gt;{s.id}&lt;/td&gt;<br>            &lt;td&gt;{s.name}&lt;/td&gt;<br>            &lt;td&gt;{s.marks}&lt;/td&gt;<br>          &lt;/tr&gt;<br>        ))}<br>      &lt;/tbody&gt;<br>    &lt;/table&gt;<br>  );<br>}</pre><p>Works like Excel, but prettier 😎</p><h3>Common Pitfalls I Ran Into</h3><ul><li>❌ Used class instead of className</li><li>❌ Forgot key prop in .map()</li><li>❌ Tried using if directly in JSX (instead, use ternary or &amp;&amp;)</li><li>❌ Thought JSX was HTML (it’s not)</li></ul><h3>Final Thoughts</h3><p>React’s real learning curve begins when JS starts behaving differently inside JSX.</p><p>You’ll meet weird rules, new syntax, but once it clicks — it’s <strong>addictive</strong>.</p><blockquote><em>My React journey started with confusion over props and ended in an obsession with building UI from data.</em></blockquote><p>If you’re still scratching your head over mapping arrays or using props correctly, trust me — that’s the sweet spot. You’re learning it right.</p><h3>TL;DR</h3><p>✔ Components are just functions that return JSX</p><p>✔ Props are like function arguments — pass them to reuse components</p><p>✔ JSX is JavaScript pretending to be HTML</p><p>✔ Arrays of objects can be mapped into full UIs</p><p>✔ key is necessary for React&#39;s virtual DOM to work smoothly</p><p>✔ Conditional rendering is your best friend</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10c92d2cd46e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Element Sizing: Pixels? Who Needs ‘Em? ]]></title>
            <link>https://ieee-tems-blogs.medium.com/element-sizing-pixels-who-needs-em-968f7fc02fd0?source=rss-2b8c918acb5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/968f7fc02fd0</guid>
            <dc:creator><![CDATA[IEEE_TEMS BLOGS]]></dc:creator>
            <pubDate>Wed, 04 Jun 2025 05:37:16 GMT</pubDate>
            <atom:updated>2025-06-07T11:06:34.119Z</atom:updated>
            <content:encoded><![CDATA[<p><em>-by </em><a href="https://medium.com/u/ee379aba8b02"><em>Rakshit Bansal</em></a></p><p>Sizing elements in CSS used to be annoying. Fixed pixels didn’t scale well, percentages were unpredictable, and vh/vw felt too rigid. But Tailwind makes it effortless with a flexible, easy-to-remember sizing system.</p><p>Let’s break it down.</p><h3>Understanding Tailwind’s Sizing Units</h3><p>1️⃣ Fixed Units (Rem-Based) 📏</p><p>Tailwind sizes things in multiples of 4px (which equals 0.25rem).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/454/1*u7o8k7JUSqO_0bij6mygfg.png" /></figure><p>1 unit = 0.25 rem = 4px</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/385/1*OOu88INfYmHt0-vfx8OcBQ.png" /></figure><p>🚀 Example:</p><pre>&lt;div class=&quot;w-64 h-32 bg-gray-200&quot;&gt;Fixed Size Box&lt;/div&gt;</pre><p>This box will be <strong>256px wide</strong> and <strong>128px tall</strong> — no need for px values!</p><h3>2️⃣ Percentage-Based Sizing 📊</h3><p>Want <strong>fluid, dynamic layouts</strong>? Tailwind offers <strong>percentage-based units</strong> like:</p><ul><li>w-full → 100% width</li><li>w-1/2 → 50% width</li><li>w-1/3 → 33.33% width</li></ul><p>🚀 <strong>Example:</strong></p><pre>&lt;div class=&quot;w-1/2 bg-green-500&quot;&gt;Half the Width&lt;/div&gt;</pre><p>This box will take <strong>half the width of its parent container</strong>.</p><h3>3️⃣ Viewport-Based Sizing 🌍</h3><p>Tailwind supports <strong>vh (viewport height) and </strong><strong>vw (viewport width)</strong> for full-screen layouts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*MY22O2vuAPWlHbJ1FJFzsQ.png" /></figure><p>🚀 Example:</p><pre>&lt;div class=&quot;h-screen bg-blue-400&quot;&gt;Full Height&lt;/div&gt;</pre><p>This makes the element <strong>take up the entire viewport height</strong> — perfect for hero sections.</p><h3>4️⃣ Auto and Max Width/Height 🔄</h3><ul><li>w-auto → Adapts to content width</li><li>max-w-lg → Limits the max width</li><li>min-h-screen → Ensures min height fills the screen</li></ul><p>🚀 <strong>Example:</strong></p><pre>&lt;div class=&quot;max-w-lg mx-auto bg-gray-100&quot;&gt;<br>  This box has a max width of `lg`, centered in the viewport.<br>&lt;/div&gt;</pre><p>Sample Code:</p><pre>&lt;!doctype html&gt;<br>&lt;html&gt;<br>    &lt;head&gt;<br>        &lt;meta charset=&quot;UTF-8&quot;&gt;<br>        &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>        &lt;!--Styles included for ease of learning!--&gt;<br>        &lt;link rel=&quot;stylesheet&quot; href=&quot;styles.css&quot;&gt;<br>        &lt;script src=&quot;https://cdn.tailwindcss.com&quot;&gt;&lt;/script&gt;<br>    &lt;/head&gt;<br>    &lt;body&gt;<br>        &lt;main&gt; &lt;!--MAIN has a height of 100vh--&gt;<br>            &lt;section class=&quot;w-64 h-32&quot;&gt;<br>                Fixed units<br>            &lt;/section&gt;<br>            <br>            &lt;!-- CHALLENGE 1: Make this section 100% of the viewport height --&gt;<br>            &lt;section class=&quot;h-full&quot;&gt;<br>                Percentage units<br>            &lt;/section&gt;<br>            <br>            &lt;!-- CHALLENGE 2: Make this section 1/3 height and<br>            1/2 width of the parent container&#39;s --&gt;<br>            &lt;section class=&quot;h-1/3 w-1/2&quot;&gt;<br>                Viewport units<br>            &lt;/section&gt;<br>        &lt;/main&gt;<br>    &lt;/body&gt;<br>&lt;/html&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DZSuqVFiUdJPCMCfxarleQ.png" /></figure><h3>Best Practices for Sizing in Tailwind</h3><p>✔ <strong>Use </strong><strong>w-full and </strong><strong>h-screen for fluid layouts</strong></p><p>✔ <strong>Avoid using raw </strong><strong>px values</strong>—stick to Tailwind’s sizing scale</p><p>✔ <strong>Combine sizing with flex/grid for the best results</strong></p><h3>Final Thoughts</h3><p>Tailwind makes sizing <strong>so easy</strong>, you’ll never want to manually write width: 200px; again. Whether it’s <strong>fixed, fluid, or viewport-based</strong>, Tailwind’s sizing system adapts perfectly to any design.</p><p>And now that we’ve mastered <strong>colors and sizing</strong>, you’re officially on your way to <strong>building stunning Tailwind-powered UIs</strong>. 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=968f7fc02fd0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tailwind Colors: More Than Just Pretty Shades ]]></title>
            <link>https://ieee-tems-blogs.medium.com/tailwind-colors-more-than-just-pretty-shades-49f6c89c921a?source=rss-2b8c918acb5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/49f6c89c921a</guid>
            <dc:creator><![CDATA[IEEE_TEMS BLOGS]]></dc:creator>
            <pubDate>Thu, 15 May 2025 16:15:54 GMT</pubDate>
            <atom:updated>2025-05-15T16:15:54.477Z</atom:updated>
            <content:encoded><![CDATA[<p><em>-by </em><a href="https://medium.com/u/ee379aba8b02"><em>Rakshit Bansal</em></a></p><p>If you’ve ever spent an unreasonable amount of time picking the <em>perfect</em> shade of blue for a button (<em>been there</em>), Tailwind has your back. Instead of memorizing hex codes or Googling “good color palettes,” Tailwind gives you a <strong>predefined, expertly crafted color system</strong> that just works.</p><p>And the best part? <strong>It’s flexible!</strong> Whether you need a subtle background or an eye-popping CTA button, you can tweak Tailwind colors like a pro. Let’s break it down.</p><h3>Tailwind’s Default Color Palette 🌈</h3><p>Tailwind provides <strong>a built-in color palette</strong> with shades ranging from <strong>50 to 900</strong>. The <strong>lighter the number, the softer the color</strong>; the <strong>higher the number, the deeper it gets</strong>.</p><p>🚀 <strong>Example:</strong></p><pre>&lt;div class=&quot;bg-blue-50&quot;&gt;Lightest Blue&lt;/div&gt;<br>&lt;div class=&quot;bg-blue-500&quot;&gt;Medium Blue&lt;/div&gt;<br>&lt;div class=&quot;bg-blue-900&quot;&gt;Darkest Blue&lt;/div&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*2asbRTvH1i1ac-3Ob_se4Q.png" /></figure><h3>Applying Colors in Tailwind</h3><h3>1️⃣ Background Colors</h3><p>Just slap bg- before the color name, and you’re set.</p><pre>&lt;div class=&quot;bg-red-500&quot;&gt;This has a red background&lt;/div&gt;<br>&lt;div class=&quot;bg-green-300&quot;&gt;This has a light green background&lt;/div&gt;</pre><h3>2️⃣ Text Colors</h3><p>Change text color using text-.</p><pre>&lt;p class=&quot;text-yellow-700&quot;&gt;Warning! This text is yellow.&lt;/p&gt;</pre><h3>3️⃣ Border Colors</h3><p>Give your elements some <strong>subtle or bold borders</strong>.</p><pre>&lt;div class=&quot;border-4 border-indigo-600&quot;&gt;Bold Indigo Border&lt;/div&gt;</pre><h3>Customizing Tailwind Colors 🎨</h3><p>While the default palette is great, <strong>sometimes you want your own colors</strong> (branding, theme consistency, or just because you’re feeling fancy).</p><p>Modify tailwind.config.js:</p><pre>module.exports = {<br>  theme: {<br>    extend: {<br>      colors: {<br>        primary: &#39;#ff5733&#39;,<br>        secondary: &#39;#1abc9c&#39;,<br>      },<br>    },<br>  },<br>};</pre><p>Now you can use:</p><pre>&lt;button class=&quot;bg-primary text-white&quot;&gt;Click Me&lt;/button&gt;</pre><p>Sample Code:</p><pre>&lt;!doctype html&gt;<br>&lt;html&gt;<br>    &lt;head&gt;<br>        &lt;meta charset=&quot;UTF-8&quot;&gt;<br>        &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;<br>        &lt;link rel=&quot;stylesheet&quot; href=&quot;styles.css&quot;&gt;&lt;/link&gt;<br>        &lt;script src=&quot;https://cdn.tailwindcss.com&quot;&gt;&lt;/script&gt;<br>    &lt;/head&gt;<br>    <br>    &lt;!-- CHALLENGE 1: Give body a background color of Amber 600 --&gt;<br>    &lt;body class=&quot;bg-amber-600&quot; &gt;<br>        <br>        &lt;!-- CHALLENGE 2: Give main a background color of Yellow 100 --&gt;<br>        &lt;main class=&quot;bg-yellow-100&quot;&gt;<br>            <br>            &lt;!-- CHALLENGE 3: Give this heading 1 a text color of Red 700 --&gt;<br>            &lt;h1 class=&quot;text-red-700&quot;&gt;🍕 Pizza Status 🍕&lt;/h1&gt;<br>            <br>            &lt;!-- CHALLENGE 4: ive this paragraph tag a text color of Orange 700 --&gt;<br>            &lt;p class=&quot;text-orange-700&quot;&gt;Out for delivery!&lt;/p&gt;<br>            <br>        &lt;/main&gt;<br>    &lt;/body&gt;<br>&lt;/html&gt;</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*sEb6cPZHtwozwAJddFkyxw.png" /></figure><h3>Best Practices for Using Colors in Tailwind</h3><p>✔ <strong>Stick to a color scale</strong> — Don’t mix random shades (use the predefined palette).</p><p>✔ <strong>Use contrast wisely</strong> — Dark text on dark backgrounds? No thanks.</p><p>✔ <strong>Leverage opacity utilities</strong> — bg-red-500/50 for a transparent effect.</p><h3>Final Thoughts</h3><p>Tailwind makes dealing with colors <strong>fast, intuitive, and fun</strong>. No more <strong>“Which hex code was that again?”</strong> — just plug in text-blue-600 and move on with your life.</p><p>Now that we’ve colored our world, let’s move on to <strong>Element Sizing in Tailwind</strong>! 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49f6c89c921a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Tailwind CSS: The Ultimate Shortcut to Beautiful, Responsive UI]]></title>
            <link>https://ieee-tems-blogs.medium.com/tailwind-css-the-ultimate-shortcut-to-beautiful-responsive-ui-7c49f6e5015c?source=rss-2b8c918acb5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c49f6e5015c</guid>
            <dc:creator><![CDATA[IEEE_TEMS BLOGS]]></dc:creator>
            <pubDate>Sat, 15 Mar 2025 04:09:15 GMT</pubDate>
            <atom:updated>2025-03-15T04:09:15.041Z</atom:updated>
            <content:encoded><![CDATA[<p>-<em>by </em><a href="https://medium.com/u/ee379aba8b02"><em>Rakshit Bansal</em></a></p><p>When I first started styling websites, my CSS files looked like <strong>an unorganized grocery list</strong> — endless margin, padding, float, position: absolute, and random !important scattered everywhere. Then I found <strong>Tailwind CSS</strong>, and let me tell you, <strong>it changed the game</strong>.</p><p>Tailwind isn’t just another CSS framework; it’s <strong>a mindset shift</strong>. Instead of writing custom CSS for every element, you use <strong>predefined utility classes</strong> that do exactly what you need, right in your HTML. No more unnecessary stylesheets, no more fighting with specificity, and best of all? <strong>It makes development crazy fast.</strong></p><p>In this blog, I’ll walk you through <strong>why Tailwind is amazing, how to set it up, and some key concepts</strong> that will make you feel like a CSS wizard. 🧙‍♂️</p><h3>Why Use Tailwind CSS?</h3><h3>1. No More Writing Custom CSS</h3><p>Let’s be real, managing huge stylesheets is a nightmare. Tailwind gives you small, atomic classes that do one job and do it well.</p><p>Compare this:</p><p><strong>Traditional CSS:</strong></p><pre>.card {<br>  background-color: #f8f9fa;<br>  padding: 20px;<br>  border-radius: 8px;<br>  text-align: center;<br>}</pre><p><strong>Tailwind CSS:</strong></p><pre>&lt;div class=&quot;bg-gray-100 p-5 rounded-lg text-center&quot;&gt;<br>  &lt;!-- Content --&gt;<br>&lt;/div&gt;</pre><p><em>Same result, way less effort.</em></p><h3>2. Mobile-First &amp; Responsive by Default</h3><p>Tailwind makes handling responsive design <strong>super easy</strong>. No need to write @media queries for every screen size—you can <strong>do it all inline</strong> with prefixes like sm:, md:, lg:, and xl:.</p><p>Example:</p><pre>&lt;div class=&quot;p-5 sm:p-10 md:p-16 lg:p-24&quot;&gt;<br>  Adaptive Padding Based on Screen Size<br>&lt;/div&gt;</pre><p>This means:</p><p>📱 Small screens → p-10</p><p>💻 Medium screens → p-16</p><p>🖥️ Large screens → p-24</p><p>Just like that, <strong>your layout adapts without extra CSS</strong>.</p><h3>3. Developer Speed = Insane</h3><p>Tailwind <strong>eliminates context-switching</strong>. You don’t have to jump between HTML and CSS files — everything is <strong>in one place</strong>. Once you get used to it, writing styles becomes as fast as typing text.</p><h3>Setting Up Tailwind CSS</h3><p>Installing Tailwind is easier than making Maggi noodles. You can either <strong>use a CDN</strong> (quickest way) or <strong>install it via npm</strong> (recommended for real projects).</p><h3>Option 1: Using a CDN (No Setup Needed)</h3><p>add this line in your &lt;head&gt;:</p><pre>&lt;script src=&quot;https://cdn.tailwindcss.com&quot;&gt;&lt;/script&gt;</pre><h3>Option 2: Installing via npm (For Production Use)</h3><p>For larger projects, installing Tailwind through npm is better because it lets you <strong>customize styles and optimize performance</strong>.</p><p>1️⃣ First, install Tailwind via npm:</p><pre>npm install -D tailwindcss</pre><p>2️⃣ Generate a Tailwind config file:</p><pre>npx tailwindcss init</pre><p>3️⃣ Add Tailwind to your CSS:</p><pre>@tailwind base;<br>@tailwind components;<br>@tailwind utilities;</pre><p>4️⃣ Start your build process:</p><pre>npx tailwindcss -i ./src/input.css -o ./dist/output.css --watch</pre><p>Now, Tailwind will process your CSS, remove unused styles (for a tiny file size), and let you <strong>customize everything</strong>.</p><h3>Final Thoughts</h3><p>When I first started using Tailwind, I thought:</p><p><em>“Why am I writing a million class names in HTML?”</em></p><p>But after a few days, I <strong>never wanted to go back</strong> to writing custom CSS. Tailwind makes styling <strong>fast, consistent, and easy to maintain</strong>.</p><p>If you’re still on the fence, try using Tailwind for your next project. Once you get the hang of it, you’ll wonder <strong>how you ever wrote CSS without it.</strong></p><h3>Next Up in the Series:</h3><p>In the next blog, we’ll dive into <strong>Tailwind’s Color System &amp; Element Sizing</strong>, where we explore how to use <strong>predefined colors, custom palettes, and responsive sizing units</strong> effectively.</p><p><strong>🚀 Stay tuned! And if you found this helpful, share your Tailwind experiences in the comments.</strong></p><h3>TL;DR (Too Long; Didn’t Read)</h3><p>✔ <strong>Tailwind CSS</strong> is a utility-first framework that makes styling <strong>faster and easier</strong>.</p><p>✔ No need to write <strong>custom CSS</strong> — just use predefined classes.</p><p>✔ <strong>CDN for quick use</strong>, <strong>npm for serious projects</strong>.</p><p>✔ <strong>Mobile-first &amp; responsive</strong> out of the box.</p><p>✔ Once you learn it, <strong>you won’t go back to traditional CSS</strong>.</p><p><strong>Happy Coding! 🚀</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c49f6e5015c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering CSS Media Queries: The Ultimate Guide to Responsive Design]]></title>
            <link>https://ieee-tems-blogs.medium.com/mastering-css-media-queries-the-ultimate-guide-to-responsive-design-da5bbd414766?source=rss-2b8c918acb5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/da5bbd414766</guid>
            <dc:creator><![CDATA[IEEE_TEMS BLOGS]]></dc:creator>
            <pubDate>Mon, 24 Feb 2025 17:47:56 GMT</pubDate>
            <atom:updated>2025-02-24T17:56:33.052Z</atom:updated>
            <content:encoded><![CDATA[<p><em>-by </em><a href="https://medium.com/u/ee379aba8b02"><em>Rakshit Bansal</em></a></p><p>Let’s be honest — if your website <strong>doesn’t look good on all devices</strong>, it’s basically broken. Nobody enjoys zooming in and out on a phone just to read text, and let’s not even talk about sites that completely fall apart on different screens.</p><p>That’s where <strong>CSS Media Queries</strong> come in — your secret weapon to making a website <strong>look perfect on every screen size</strong>. Whether it’s a phone, tablet, laptop, or a giant 4K display, media queries <strong>let you tweak your design</strong> based on the user’s device.</p><p>So, let’s break it down <strong>without the boring textbook jargon.</strong></p><h3>CSS Media Queries Overview</h3><p>Media queries allow you to apply CSS styles based on device characteristics like screen width, height, or orientation. They are crucial for responsive web design.</p><h3>Basic Syntax</h3><pre>@media mediatype and (condition) {<br>    /* CSS rules */<br>}</pre><h3>Common Media Types (Where Do These Styles Apply?)</h3><ul><li><strong>all</strong> — All devices</li><li><strong>screen</strong> — Computer screens, tablets, phones</li><li><strong>print</strong> — Printers</li><li><strong>speech</strong> — Screen readers</li></ul><p>In most cases, we just use screen because that’s where responsive design matters.</p><h3>Common Breakpoints</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*uQ5PxiqDuEGP14nrXETu0A.png" /></figure><p>But these aren’t <strong>strict rules</strong> — you can set your own based on your project.</p><h4>Mobile First (min-width)</h4><pre>/* Small devices (phones) */<br>@media (min-width: 576px) {<br>    /* styles */<br>}<br><br>/* Medium devices (tablets) */<br>@media (min-width: 768px) {<br>    /* styles */<br>}<br><br>/* Large devices (desktops) */<br>@media (min-width: 992px) {<br>    /* styles */<br>}</pre><h4><strong>Desktop First (max-width)</strong></h4><pre>/* Large devices (desktops) */<br>@media (max-width: 992px) {<br>    /* styles */<br>}<br><br>/* Medium devices (tablets) */<br>@media (max-width: 768px) {<br>    /* styles */<br>}<br><br>/* Small devices (phones) */<br>@media (max-width: 576px) {<br>    /* styles */<br>}</pre><h3>Advanced Media Queries (More Than Just Screen Size!)</h3><h3>📐 1. Between Two Sizes (min-width + max-width)</h3><pre>/* Styles for screens between 600px and 900px */<br>@media (min-width: 600px) and (max-width: 900px) {<br>    /* styles */<br>}</pre><h4>Combine</h4><pre>/* Styles for screens below 600px and above 900px */<br>@media (max-width: 600px) and (min-width: 900px) {<br>    /* styles */<br>}</pre><h3>📱 2. Based on Device Orientation</h3><p>Want different styles in <strong>portrait vs. landscape mode</strong>?</p><p>Great for mobile-friendly <strong>gaming UIs, dashboards, or full-screen apps</strong>.</p><pre>@media (orientation: portrait) {<br>    body {<br>        background-color: violet;<br>    }<br>}</pre><h3>🎞 3. High-Resolution Screens (Retina, 4K, etc.)</h3><p>Some styles look bad on <strong>super high-resolution</strong> screens (<em>like retina displays</em>).</p><pre>@media (min-resolution: 300dpi) {<br>    body {<br>        font-size: 18px;<br>    }<br>}</pre><h3>🔲 4. Aspect Ratio (For Responsive Videos &amp; Grids)</h3><p>Want different layouts for <strong>wider</strong> or <strong>taller</strong> screens?</p><p>Useful for <strong>video players, grids, and UI elements that depend on screen shape</strong>.</p><pre>@media (aspect-ratio: 16/9) {<br>    video {<br>        width: 100%;<br>    }<br>}</pre><h4>Examples</h4><pre>/* Portrait orientation */<br>@media (orientation: portrait) {<br>    /* styles */<br>}<br><br>/* High DPI devices */<br>@media (min-resolution: 300dpi) {<br>    /* styles */<br>}<br><br>/* Specific aspect ratio */<br>@media (aspect-ratio: 16/9) {<br>    /* styles */<br>}</pre><h3>Exampe code:</h3><p>TODO: Change the background color for each device <br>[lightsalmon] Mobile Devices: 319px — 480px <br>[powderblue] iPads and Tablets: 481px — 1200px <br>[limegreen] Laptops: 1201px — 1600px <br>[seagreen] Desktops: 1601px and more</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br><br>&lt;head&gt;<br>  &lt;meta charset=&quot;UTF-8&quot;&gt;<br>  &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, minimum-scale=1&quot; /&gt;<br><br>  &lt;title&gt;Document&lt;/title&gt;<br>  &lt;style&gt;<br>    body {<br>      background-color: aquamarine;<br>    }<br><br>    @media (min-width: 319px) and (max-width: 480px) {<br>      body {<br>        background-color: lightsalmon;<br>      }<br>    }<br><br>    @media (min-width: 481px) and (max-width: 1200px) {<br>      body {<br>        background-color: powderblue;<br>      }<br>    }<br><br>    @media (min-width: 1201px) and (max-width: 1600px) {<br>      body {<br>        background-color: limegreen;<br>      }<br>    }<br><br>    @media (min-width: 1601px) {<br>      body {<br>        background-color: seagreen;<br>      }<br>    }<br>  &lt;/style&gt;<br>&lt;/head&gt;<br><br>&lt;body&gt;<br>&lt;/body&gt;<br><br>&lt;/html&gt;</pre><h4>Output:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*hCp82njmDpQD3GlZN7E0kQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*_hAX1YDf3o7QdD8vrBMKsQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*mbxqaMbhPm9q2gziSEDABw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*Xsr1M70Ir30G9OkuXGKYMg.png" /></figure><h3>Common Use Cases</h3><pre>/* Hide elements on small screens */<br>@media (max-width: 600px) {<br>    .desktop-only {<br>        display: none;<br>    }<br>}<br><br>/* Change layout on different screen sizes */<br>@media (min-width: 768px) {<br>    .grid {<br>        grid-template-columns: repeat(2, 1fr);<br>    }<br>}<br><br>/* Adjust font sizes for readability */<br>@media (max-width: 400px) {<br>    body {<br>        font-size: 14px;<br>    }<br>}</pre><h3>Best Practices for Media Queries</h3><p>✔ <strong>Test on multiple devices</strong> → Don’t just rely on resizing your browser window.<br>✔ <strong>Use relative units</strong> (em, rem, %) → Avoid hardcoding pixel values.<br>✔ <strong>Keep breakpoints consistent</strong> → Standardize them across your project.</p><h3>Final Thoughts</h3><p>Mastering media queries <strong>isn’t optional anymore</strong> — every website today needs to be responsive. The key is to <strong>start small (mobile-first), test often, and keep things consistent</strong>.</p><p>If you’re new to media queries, start by tweaking <strong>existing projects</strong> instead of building from scratch. Resize your browser, <strong>play around with breakpoints</strong>, and see how small changes can make a huge impact.</p><p>Got any cool media query tricks? <strong>Drop them in the comments!</strong> 🚀</p><h3>TL;DR (Too Long; Didn’t Read)</h3><p>✔ <strong>Media queries</strong> adapt styles based on screen size, orientation, or resolution.<br>✔ Use <strong>mobile-first</strong> (min-width) for better scalability.<br>✔ Stick to <strong>standard breakpoints</strong> for consistency.<br>✔ Test across <strong>real devices, not just browser resizes</strong>.</p><p>Happy coding!💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da5bbd414766" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Flexbox: A Fun Yet Powerful CSS Journey]]></title>
            <link>https://ieee-tems-blogs.medium.com/mastering-flexbox-a-fun-yet-powerful-css-journey-a7e045d399b8?source=rss-2b8c918acb5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7e045d399b8</guid>
            <dc:creator><![CDATA[IEEE_TEMS BLOGS]]></dc:creator>
            <pubDate>Mon, 17 Feb 2025 16:13:44 GMT</pubDate>
            <atom:updated>2025-02-17T16:13:44.112Z</atom:updated>
            <content:encoded><![CDATA[<p><em>-by </em><a href="https://medium.com/u/ee379aba8b02"><em>Rakshit Bansal</em></a></p><p>When I first started learning <strong>Flexbox</strong>, I had one simple goal — stop struggling with float, position, and unnecessary margin hacks. If you’ve ever spent hours trying to center a div <em>(and failed)</em>, welcome to the club! But trust me, once you get the hang of Flexbox, it’s like unlocking a new level in CSS.</p><p>I learned Flexbox through Scrimba, took notes on Notion, and now I’m sharing my journey — what I learned, what confused me, and some golden rules to keep in mind. If you’re just starting, consider this your <strong>cheat sheet + survival guide.</strong></p><h3>What is Flexbox? (And Why Should You Care?)</h3><p>Flexbox (Flexible Box Layout) is a <strong>one-dimensional layout method</strong> in CSS that lets you design <strong>responsive layouts</strong> with ease. Whether you’re building a navbar, a dashboard, or a card layout, Flexbox makes things so much smoother.</p><p>Before Flexbox, CSS layouts were messy. We had to rely on:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*XH5D77h9upfpOLb_4Np46A.png" /></figure><p>Flexbox solves these issues by letting you align elements effortlessly, control spacing dynamically, and create layouts that adapt to different screen sizes.</p><h3>Intro</h3><p>Flexbox (Flexible Box Layout) CSS module makes it easier to design flexible responsive layout structure without using float or positioning. It’s a one-dimensional layout method for arranging items in rows or columns.</p><p>As long as the parent element is display: flex, all its children will inherit the flex style properties</p><p>It is mainly for layouts in 2D direction (single line), while grid is for 3D layout.</p><h3>Step 1: Setting up Flex Container</h3><pre>.container {<br>    display: flex; /* or inline-flex */<br>    border: 5px solid #ffcc5c;<br>}</pre><p>This one line activates Flexbox for all child elements inside “.container”. Now, instead of behaving like block elements, the children will respect Flexbox properties.</p><h3>Step 2: Understanding The Core Concepts</h3><h3>1. The Two Axes:</h3><ul><li><strong>Main Axis</strong> → The direction items are arranged (<em>horizontal by default</em>).</li><li><strong>Cross Axis</strong> → Perpendicular to the main axis.</li></ul><h3>2. Flex Container &amp; Flex Items</h3><ul><li><strong>Flex Container</strong>: The parent that holds the flex items.</li><li><strong>Flex Items</strong>: The direct children of the flex container.</li></ul><h3>Step 3: The Must-Know Flex Properties</h3><h3>flex-direction</h3><p>Defines direction of main axis</p><pre>.container {<br>    flex-direction: row | row-reverse | column | column-reverse;<br>}</pre><p>Flex-direction: row (its the defalt direction):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*pY-zH899RGJLeBfXe8-QHQ.png" /></figure><p>Flex-direction: column:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*bAR1OOkqKQsXV-JeVy_KOA.png" /></figure><h3>justify-content</h3><p>Aligns items along main axis (by default, horiontally)</p><pre>.container {<br>    justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly;<br>}</pre><h3>Examples:</h3><p>justify-content: flex-start:</p><pre>.container {<br>  border: 5px solid #ffcc5c;<br>  display: flex;<br>  justify-content: flex-start;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*H95jk0x3DXvVRW2MqJLFog.png" /></figure><p>justify-content: flex-end:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*S7TOg8R-0oXTSfqfXrK5eA.png" /></figure><p>justify-content: center:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*Mn7ozzULEMDpccYgmiYrOA.png" /></figure><p>justify-content: space-between:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/650/1*cxQk9Ym17dsNV38P1tIJNw.png" /></figure><h3>align-items</h3><p>Aligns items along cross axis (by default, vertically):</p><pre>.container {<br>    align-items: stretch | flex-start | flex-end | center | baseline;<br>}</pre><p>align-items: stretch:</p><pre>.container {<br>  border: 5px solid #ffcc5c;<br>  display: flex;<br>  height: 100%;<br>  align-items: stretch;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/566/1*PczO2ZlteVFwMWpO08ch4Q.png" /></figure><p>align-items: flex-start:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*45D5v0KlrzSYVfGOyjGACQ.png" /></figure><p>align-items: flex-end:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*bcDD4ZZcgwHT5BSyg7o8GA.png" /></figure><p>align-items: center:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*495DRlMe_VEjdBvSQvqZPw.png" /></figure><p>targeting individual elements:</p><pre>.container {<br>  border: 5px solid #ffcc5c;<br>  display: flex;<br>  height: 100%;<br>  align-items: center;<br>}<br><br>.logout {<br>  align-self: flex-start;<br>}<br><br>.home {<br>  align-self: flex-end;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*wsYDmCCbUxx7YKw5AvdJXw.png" /></figure><h3>Imp: difference b/w align-items and justify-content</h3><p>align-items is for aligning vertically, and justify-content is for aligning horizontally, main axis (this is by default, considering flex-direction: row)</p><p>justify-content: center:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/651/1*Mn7ozzULEMDpccYgmiYrOA.png" /></figure><p>align-items:center:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/564/1*495DRlMe_VEjdBvSQvqZPw.png" /></figure><p>Combining them both- Example1:</p><pre>.container {<br>  border: 5px solid #ffcc5c;<br>  display: flex;<br>  height: 100%;<br>  align-items: center;<br>  justify-content: center;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*reGmgHzHiG1k2iXiM7dChA.png" /></figure><p>Example 2:</p><pre>.container {<br>  border: 5px solid #ffcc5c;<br>  display: flex;<br>  height: 100%;<br>  align-items: center;<br>}<br><br>.logout {<br>  align-self: flex-start;<br>}<br><br>.home {<br>  align-self: flex-end;<br>}</pre><h3>flex-wrap</h3><p>Controls wrapping of flex items.</p><p>by default it is flex-wrap: nowrap; ⇒ this means you can only have one row/column depending on flex direction.</p><pre>.container {<br>    flex-wrap: nowrap | wrap | wrap-reverse;<br>}</pre><p>Example: if the container width exceed the width of all elements combined:</p><pre>.container {<br>  border: 5px solid #ffcc5c;<br>  display: flex;<br>  flex-wrap: no-wrap;<br>}<br><br>.container &gt; div {<br>  width: 300px;<br>}</pre><p>when container is &lt;900px:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*bf_snoLvCkfQ_wbd7Fbisw.png" /></figure><p>when container is &gt;900px:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/678/1*D9wTDntG7D4RCTWACpbL-w.png" /></figure><p>Example: flex-wrap: wrap:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*XptwCLDMuhoQKecFgk1PQw.png" /></figure><p>here, we can see, elements will be placed in row below, if there isn’t enough width of the container.</p><h3>the flex property</h3><p>if flex is 1, all flex elements will be equal width (or height in case of column direction). if we increase or decrease it for a certain element, we can size it proportional to other elements, in a responsive manner.</p><p>if we dont use flex property at any element, their width remains the same irrespective of screen size.</p><p>ex:</p><pre>&lt;html&gt;<br>    &lt;head&gt;<br>        &lt;link rel=&quot;stylesheet&quot; href=&quot;basic.css&quot;&gt;<br>        &lt;link rel=&quot;stylesheet&quot; href=&quot;index.css&quot;&gt;<br>        &lt;style&gt;<br>         .container {<br>        border: 5px solid #ffcc5c;<br>        display: flex;<br>     }<br><br>     .container &gt; div {<br>       flex: 1;<br>     }<br>    &lt;/style&gt;<br>    &lt;/head&gt;<br>    &lt;body&gt;<br>        &lt;div class=&quot;container&quot;&gt;<br>            &lt;div class=&quot;home&quot;&gt;Home&lt;/div&gt;<br>            &lt;div class=&quot;search&quot;&gt;Search&lt;/div&gt;<br>            &lt;div class=&quot;logout&quot;&gt;Logout&lt;/div&gt;<br>            <br>        &lt;/div&gt;<br>    &lt;/body&gt;<br>&lt;/html&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*3mt8rQbrpY_1dqkI4nXOEQ.png" /></figure><p>if we increase flex for an element:</p><pre>.container {<br>  border: 5px solid #ffcc5c;<br>  display: flex;<br>}<br><br>.container &gt; div {<br>  flex: 1;<br>}<br><br>.container &gt; .search {<br>  flex: 2;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*mg9DW3wjNTeXpXiQg6nKhw.png" /></figure><h3>Flex Item Properties</h3><h3>flex-grow</h3><p>Defines ability to grow if necessary</p><pre>.item {<br>    flex-grow: 0; /* default */<br>    flex-grow: 1; /* allow growth */<br>}</pre><h3>flex-shrink</h3><p>Defines ability to shrink if necessary</p><pre>.item {<br>    flex-shrink: 1; /* default */<br>    flex-shrink: 0; /* prevent shrinking */<br>}</pre><h3>flex-basis</h3><p>Sets default size of element</p><pre>.item {<br>    flex-basis: auto; /* default */<br>    flex-basis: 200px; /* specific width */<br>}</pre><h3>flex shorthand</h3><p>Combines flex-grow, flex-shrink, and flex-basis</p><pre>.item {<br>    flex: 0 1 auto; /* default */<br>    flex: 1; /* same as flex: 1 1 0% */<br>}</pre><p>Note: when we set flex:1 (or any value for that matter), we are setting all 3 flex properties for that element. by default, flex: 1 denotes flex: 1 1 0;</p><pre> flex: 1;<br> /*<br> this means<br> flex: 1 1 0;<br>     OR<br>  flex-grow: 1;<br>  flex-shrink: 1;<br>  flex-basis: 0;<br> */</pre><h3>Common Use Cases</h3><ul><li>Centering elements both horizontally and vertically</li><li>Creating responsive navigation bars</li><li>Building card layouts</li><li>Creating equal-height columns</li></ul><h3>Browser Support</h3><p>Flexbox is supported in all modern browsers. For older browsers, consider using vendor prefixes or fallback layouts.</p><h3>Practical Example</h3><pre>.nav-container {<br>    display: flex;<br>    justify-content: space-between;<br>    align-items: center;<br>    padding: 1rem;<br>    background-color: #f8f9fa;<br>}<br><br>.nav-items {<br>    display: flex;<br>    gap: 1rem;<br>}<br><br>.nav-item {<br>    flex: 0 1 auto;<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7e045d399b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Navigating the Frontend Landscape: Lessons Learned and Resources That Work]]></title>
            <link>https://ieee-tems-blogs.medium.com/navigating-the-frontend-landscape-lessons-learned-and-resources-that-work-8e835c61f51a?source=rss-2b8c918acb5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8e835c61f51a</guid>
            <dc:creator><![CDATA[IEEE_TEMS BLOGS]]></dc:creator>
            <pubDate>Wed, 18 Dec 2024 16:10:33 GMT</pubDate>
            <atom:updated>2025-02-17T16:17:45.269Z</atom:updated>
            <content:encoded><![CDATA[<p><em>-by </em><a href="https://medium.com/u/ee379aba8b02"><em>Rakshit Bansal</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*oJEd1VxAJqHaj35cWzqkeA.png" /></figure><p>Embarking on the journey of frontend development is an exhilarating yet daunting task. When I first started, I was eager to dive in and quickly become proficient. I began with Angela Yu’s web development course on Udemy. On the surface, it seemed perfect — it covered everything from frontend basics like HTML and CSS to backend essentials, databases, version control, and more. However, as I delved deeper, I encountered challenges that significantly shaped my learning experience.</p><p><strong>The Initial Highs and Subsequent Lows</strong></p><p>Angela’s course is a gem for beginners. The HTML and CSS sections are thorough, and the way she incorporated concepts like Bootstrap, Flexbox and Grid was exceptional. JavaScript was also well covered initially. But as the course progressed, the pace slowed, and the content felt increasingly irrelevant. This is a common pitfall in learning: the more you learn, the more you realize how much you don’t know, which can lead to anxiety and the urge to quit.</p><p>A significant mistake many beginners make, including myself, is trying to dive too deep into HTML and CSS. While it’s crucial to have a good foundation, getting lost in the endless nuances can be discouraging. My golden advice: <strong>learn the basics and move on</strong>. Focus on projects and practical application rather than trying to master every detail upfront. When you start working with frameworks like React, you’ll naturally pick up advanced CSS and JavaScript concepts as needed.</p><p><strong>The Problem with Sequencing</strong></p><p>Another issue I faced was the sequencing of topics in Angela’s course. After JavaScript, the course jumps into backend development with Node.js, databases etc. While these are essential skills, they felt out of place when my main goal was to become proficient in frontend development. This misalignment led me to spend weeks on topics that didn’t align with my immediate learning goals, causing frustration and a significant waste of time.</p><p>The JSX module, in particular, was challenging and felt irrelevant. These concepts could have been integrated more seamlessly into the Node.js or React sections. The course’s backend coverage, although impressive, didn’t introduce many crucial Node.js modules needed for real-world applications. <strong>Teaching backend before React seemed counterintuitive, especially since React is a frontend library.</strong></p><p><strong>Finding a Better Fit: Scrimba</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*UwYjSpu3JYeRGB5AoYEB9Q.png" /></figure><p>Eventually, I decided to quit Angela’s course and found Scrimba, which was a game-changer. Scrimba’s courses are highly interactive, with an integrated coding environment that lets you code along as you learn. This hands-on approach, combined with project-based learning, makes a huge difference. While Angela’s course included small projects, they often felt too guided and didn’t push me out of my comfort zone.</p><p>Scrimba’s focus on building projects is the fastest and most efficient way to learn. It forces you to apply what you’ve learned, solving real problems and reinforcing your knowledge. This approach helped me avoid “tutorial hell,” where you spend more time watching videos than actually coding.</p><p><strong>The Importance of Project-Based Learning</strong></p><p>Building projects is crucial. It not only solidifies your understanding but also keeps you motivated. When you see a tangible result of your work, it boosts your confidence and provides a sense of accomplishment. This hands-on approach helps you to apply theoretical knowledge in real-world scenarios, making learning more effective and engaging.</p><p><strong>Key Benefits of Project-Based Learning:</strong></p><p><strong>1. Practical Application</strong>: By working on projects, you get to apply what you’ve learned in a practical context. This helps you understand how different concepts come together to form a complete solution.</p><p><strong>2. Problem-Solving Skills</strong>: Projects often present unique challenges that require creative problem-solving. This experience is invaluable as it prepares you for real-world situations where you may not have a clear guide.</p><p><strong>3. Portfolio Development</strong>: Each project you complete can be added to your portfolio. This is crucial for showcasing your skills to potential employers or clients. A strong portfolio can often speak louder than a resume.</p><p><strong>4. Confidence Building</strong>: Successfully completing projects builds your confidence. It shows you that you are capable of turning ideas into reality, which is incredibly motivating.</p><p><strong>5. Learning from Mistakes</strong>: Working on projects inevitably involves making mistakes. These mistakes are learning opportunities that help you grow and improve your skills.</p><p>When you focus on building projects, you move from passive learning to active learning. This transition is essential for truly mastering frontend development. By constantly challenging yourself with new projects, you not only reinforce your existing knowledge but also push your boundaries, making you a more versatile and capable developer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*12gRRgLcbbM4wVFagHU0Wg.png" /></figure><p><strong>Avoiding Tutorial Hell</strong></p><p>“Tutorial hell” is a real problem where you find yourself endlessly watching tutorials without actually building anything. Here’s how to avoid it:</p><p><strong>1. Set Clear Goals</strong>: Define what you want to achieve with each tutorial. Once you’ve learned the key concepts, move on to building something on your own.</p><p><strong>2. Limit Your Resources</strong>: Stick to a few high-quality resources instead of jumping from one tutorial to another.</p><p><strong>3. Apply What You Learn</strong>: After watching a tutorial, implement what you’ve learned in a project. This helps reinforce the concepts and makes learning more effective.</p><p><em>“Knowledge is of no value unless you put it into practice.” — Anton Chekhov</em></p><p><strong>Exploring and Participating</strong></p><p>To truly excel, immerse yourself in the developer community. Here are some ways to do that:</p><p><strong>1. Join Hackathons</strong>: These are great opportunities to work on real projects, learn from others, and network.</p><p><strong>2. Engage in Online Forums</strong>: Platforms like Stack Overflow, Reddit, and Dev.to are excellent places to ask questions, share knowledge, and learn from others.</p><p><strong>3. Follow Tech Influencers</strong>: Keep up with industry trends and best practices by following blogs, YouTube channels, and social media accounts of experienced developers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*ynlHszIYgDqsaaOKI06_1A.png" /></figure><p><strong>Reading Official Documentation</strong></p><p>One of the most important skills you can develop is the ability to read and understand official documentation. Here’s why:</p><p><strong>1. Accuracy</strong>: Official docs are usually the most accurate and up-to-date resources available.</p><p><strong>2. In-Depth Knowledge</strong>: They provide detailed explanations and cover edge cases that tutorials might skip.</p><p><strong>3. Self-Sufficiency</strong>: Being able to navigate documentation makes you less dependent on tutorials and helps you find solutions on your own.</p><p><strong>Recommended Resources</strong></p><p><strong>HTML, CSS, and JavaScript:</strong> Angela Yu’s course on Udemy is excellent for beginners. For those who prefer a more self-directed approach, FreeCodeCamp and MDN Web Docs are outstanding. Alternatively, CodeWithHarry(beginner-friendly content, although it’s not as comprehensive).</p><p><strong>React:</strong> Scrimba is fantastic for its interactive learning environment. The <strong>official React documentation</strong> is also a must-read for mastering React.</p><p><strong>Project-Based Learning:</strong> Scrimba and FreeCodeCamp are both great platforms that emphasize learning through projects. Personal recommendation: 6 Pack Programmer is an Indian youtuber, and you can greatly benefit from his project videos.</p><p><strong>Podcasts and Blogs:</strong> Follow people who have been in the tech field for a long time and have contributed significantly to the community. “Develop Yourself” by Brian Jenney is a great podcast to start with. Read blogs, check out portfolios, and immerse yourself in the developer mindset.</p><p><strong>More on Scrimba</strong></p><p>Scrimba’s courses are particularly user-friendly because of their interactive format. I personally found scrimba very helpful, and its features that stand out are:</p><p><strong>1. Interactive Coding Environment</strong>: Code alongside the instructor within the platform itself, making the learning process seamless and engaging.</p><p><strong>2. Project-Based Learning</strong>: Each course is designed around projects that you build as you go, ensuring that you apply what you learn immediately.</p><p><strong>3. Community and Support</strong>: Scrimba offers a supportive community where you can ask questions, share projects, and get feedback from peers and instructors.</p><p><strong>Building Your Identity and Mindset</strong></p><p>To truly thrive as a developer, it’s crucial to build your identity and mindset as a coder. This involves immersing yourself in the developer community, staying curious, and continually learning. The more you explore and teach yourself, the better you will learn. Follow tech influencers, read blogs, check out people’s portfolios, and listen to podcasts. This holistic approach helps you think like a coder, making the learning process more enjoyable and sustainable.</p><p><em>“The only way to do great work is to love what you do.” — Steve Jobs</em></p><p>Once you start living and loving this coding journey, you will go far in this field with ease.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*y1ysPBpj4eRzxffA7qxIpQ.png" /></figure><p><strong>Personal Tips for Success</strong></p><p><strong>1. Stay Consistent</strong>: Learning to code is a marathon, not a sprint. Set aside dedicated time each day or week to practice and stick to it.</p><p><strong>2. Seek Feedback</strong>: Don’t be afraid to share your work and ask for feedback. Constructive criticism is invaluable for growth.</p><p><strong>3. Build a Network</strong>: Connect with other learners and professionals. Join local meetups, online communities, and social media groups focused on web development.</p><p><strong>4. Stay Updated</strong>: The tech industry evolves rapidly. Make it a habit to read articles, watch talks, and follow industry news to stay current.</p><p><strong>Conclusion</strong></p><p>Navigating the frontend development landscape is a journey filled with highs and lows. By focusing on practical application, avoiding common pitfalls, and leveraging the right resources, you can make your learning experience more effective and enjoyable. Remember, the goal is to build, create, and continually improve. <strong>Happy coding!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8e835c61f51a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NAVIGATING THE FUTURE : THE ROLE OF AI IN MANAGEMENT]]></title>
            <link>https://ieee-tems-blogs.medium.com/navigating-the-future-the-role-of-ai-in-management-2bfac720c9b0?source=rss-2b8c918acb5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/2bfac720c9b0</guid>
            <dc:creator><![CDATA[IEEE_TEMS BLOGS]]></dc:creator>
            <pubDate>Thu, 04 Jul 2024 12:38:21 GMT</pubDate>
            <atom:updated>2024-07-04T13:09:09.821Z</atom:updated>
            <content:encoded><![CDATA[<h3>NAVIGATING THE FUTURE : THE ROLE OF AI IN MANAGEMENT</h3><p>It is truly said that “Artificial Intelligence is a tool, not a threat”, as in today’s modern era, AI has a profound impact on our daily lives, and it has profoundly impacted the field of Management too. Effective management helps in setting clear goals, facilitates coordination and collaboration among different departments, involves providing leadership and motivation to the other team members, and ensures that resources such as finances and human capital are being used efficiently to achieve the goals. But it’s too much of a work for someone who is already struggling with the other things in their day-to-day life and so AI makes it a lot easier.</p><ol><li><strong>MONITOR WORKPLACE SAFETY:</strong> It reduces the potential for damage from poor execution and can prevent mistakes. AI calls out issues with much higher accuracy and gives more predictable results which can save lives. Humans do it as well, but they get tired ,and it’s nearly impossible for a human to be so accurate.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A4jLco1CMxxetZGtD0_F8A.jpeg" /></figure><p>It can be used to develop personalized and interactive safety training programs for employees. AI can optimize evacuation routes during a fire or identify the location of injured workers in a hazardous environment. AI-enabled wearable devices can track the vital signs and movement patterns of workers in real time.</p><p><strong>2)</strong> <strong>OPTIMIZE SUPPLY CHAINS:</strong> AI can help businesses optimize their supply chains because it in the form of machine learning predicts supply and demand, making greater workflow automation possible. The use of AI leads to better and more finished products, hence reducing the chances of damaged products and lowering procurement costs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*bdtWbtH5KrerxNzVY98fwg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-jMLjjl5N-tDY-7g7s3iWg.jpeg" /><figcaption>AI is reducing the need for manpower</figcaption></figure><p>AI algorithms can analyze supplier performance data, market conditions, and geopolitical factors to optimize sourcing decisions, including supplier selection, negotiation, and risk management. It also reduces the need for manpower which helps companies lower their costs and increase efficiency as it reduces dependency on certain people for specific tasks as the dependency may sometimes lead to the stopping of production or may become very difficult to handle.</p><p><strong>3)</strong> <strong>EXPLORE CUSTOMER BEHAVIOR:</strong> A successful business is when its customers and content and happy with the product that they’re investing in. With the help of AI, companies can more successfully track the statistics of a product, its demand, and customer reviews, thus helping it to know in which areas it could work better and improve its products accordingly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*U_Tqbh1z9l9VMlOcYrg5KA.png" /><figcaption>A glimpse of how customer satisfaction can affect a business</figcaption></figure><p><strong>4) FOCUS ON JUDGEMENT WORK:</strong> There are a lot of decisions that require important insights. AI algorithms can analyze vast amounts of data much faster and more accurately than humans. By analyzing proper trends and extracting patterns and correlations from data, AI can provide valuable insights that inform judgement-based decisions. Predictive modeling techniques to forecast outcomes and identify potential risks and opportunities help judgement workers anticipate future scenarios and make proactive decisions. Natural Language Processing (NLP) enables AI to generate and understand human language, which helps in sentiment analysis, document summarization, and extracting key information from unstructured text data. Automation of routine tasks such as data entry, data processing, and basic analysis, freeing up human judgement workers to focus on higher-level decision-making.</p><p><strong>5) DETECTION OF FRAUD:</strong> Traditionally, fraud detection has relied on static rules-based systems, which have several shortcomings, which make them less effective. AI-powered systems on the other hand can recognize patterns associated with known fraudulent behavior based on historical data and trends. It can analyze large volumes of data from multiple sources, such as financial transactions, employee records, and communication logs, to identify unusual patterns or anomalies that may indicate fraudulent activity. By identifying high-risk areas or individuals proactively with the help of AI, organizations can implement preventive measures to mitigate the likelihood of fraud occurring. NLP technology enables AI systems to analyze unstructured data, such as emails, chat logs, and documents, to identify language patterns indicative of fraud or misconduct. By leveraging AI-driven fraud detection solutions, organizations can stay one step ahead of fraudsters and safeguard their operations against financial losses and reputational damage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*0tl8AxhZGtdjiq-0qdmAMw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*f8JAMhVncdDlZ7cUwaUXrQ.png" /></figure><p><strong>6) FORECAST DEMAND:</strong> AI-powered inventory optimization solutions can balance supply and demand by dynamically adjusting inventory levels based on demand forecasts, lead times, and cost considerations. By incorporating factors such as seasonality, promotions, and competitive dynamics, AI can generate more accurate demand forecasts. AI algorithms can analyze historical sales data, customer behavior, market trends, and external factors to identify patterns and correlations that influence product demand. By monitoring consumer sentiment and market signals, AI can identify emerging trends or shifts in demand and alert businesses to adjust their inventory levels or production schedules accordingly. By monitoring online conversations and feedback channels, businesses can gain valuable insights into customer preferences, concerns, and emerging trends that may impact product demand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*zVEALW7bq95_i1_trf76iA.png" /></figure><p>Artificial intelligence is bringing positive change in the management domain of businesses. From handling the smallest routine tasks such as data entry, data processing, and basic analysis to keeping a check on the major aspects such as Fraud Detection and Workplace Safety, AI makes it a lot easier and safer for the employees and seniors of a department, by reducing their work, hence giving them a chance to think better and contribute their ideas and insights more in the business.</p><p>Using AI smartly opens up a new way for growth by optimizing supply chains and keeping track of customer behavior, hence transforming businesses by enabling them to operate more efficiently, make better decisions, and create more personalized experiences for their customers.</p><p>THANK YOU!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2bfac720c9b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git 101]]></title>
            <link>https://ieee-tems-blogs.medium.com/git-101-8193542d7f2c?source=rss-2b8c918acb5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8193542d7f2c</guid>
            <dc:creator><![CDATA[IEEE_TEMS BLOGS]]></dc:creator>
            <pubDate>Sat, 25 May 2024 17:16:23 GMT</pubDate>
            <atom:updated>2024-05-25T17:16:23.921Z</atom:updated>
            <content:encoded><![CDATA[<p>Beginning with any online session, we hear everyone throwing out the phrase:<br> <em>“You can get the project from my GitHub profile”</em>, <em>“Push the changes in Git”</em> but what is Git really and what do these terms <em>git clone,</em> <em>git branch </em>and their numerous brothers or sisters mean. <br> So, let’s first begin with what Git really is:</p><p><strong>Git</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/1*cjFFRg9D99_mMMVi_RN6Zw.png" /></figure><p>Git is like a diary in which you and your team can store all your code for the project and all the updates that you perform so that if you make a mistake down the line, you can easily go back to the previous version or as it’s official website states:</p><p><em>“Git is a free and open-source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.”</em></p><p>This saves 1000s of hours that may be spent just to revert the changes your friend made accidentally in the group project.</p><p><strong>Setting up Git<br> </strong>In order to use Git locally on your computer, you’ll need to set it up first –</p><p>1. Download and install the latest version of Git. <br> <a href="https://git-scm.com/downloads">https://git-scm.com/downloads</a></p><p>2. Open Git Bash</p><p>3. Set up your username</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*yfpzuo3n8gXEzxr5j8mYTg.png" /></figure><p>4. Set up your commit email address in Git</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/521/1*U7xe-fb5qnnzE_XxoGj8gA.png" /></figure><p>Now for making projects and tracking them, we’ll be using GitHub to make our lives easier and this blog shorter.</p><p><strong>GitHub ??<br> </strong>Ok so we know what Git is but what about GitHub? <br> GitHub is like a platform where we can host our Git files. It acts like a library of all the projects that we can easily access and download.<br> This also acts as a platform for sharing codes, projects and also as a proof of credibility as each and every commit is saved and can then be accessed or reverted back to.</p><p>So, let’s see how we can create our own GitHub account and then how to begin with our new project:</p><p><strong>Setting Up GitHub and beginning a project:</strong></p><p>1. Go to <a href="https://github.com/">https://github.com/</a></p><p>2. Follow the steps to setup / login to your account</p><p>(Don’t forget to enable 2FA for extra safety )</p><p>Now with that done, we can move towards the various scary “git” commands and try to simplify them. We’ll use the commands on our new project to make it simpler.</p><p><strong>git Commands</strong></p><p><strong>git clone<br> </strong>This command is the beginning for our git project. This creates a folder (or directory) that contains all our files for the project locally which makes it easier for us to add, delete or modify files as we wish.</p><ol><li>Open “Command Prompt” by searching cmd in search bar.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*_thSixehQfp4FycT-LY4MA.png" /></figure><p>2. Use the command “cd &lt;directory address&gt;” to open the folder where you want to save the git repository.</p><p>3. Now use “git clone &lt;https address&gt;&gt;” to clone the repository into your system.</p><p>If you now open</p><p>Opening the location, we’ll find a new folder with the name of our GitHub project.<br> (If we enable the “view hidden files” option, we can see a .git folder which stores the commits and history of our project and even more files that are too complicated to explain here)</p><p>Congratulations! You’ve successfully cloned a Git repository to your local machine. Now you can start working on the project and make changes as needed. Remember to use git pull regularly to keep your local copy up-to-date with any changes made to the remote repository.</p><p>Git classifies any changes made into some stages that will help us to understand them better:</p><p><strong>U — </strong>This refers to “Untracked File”. It simply means that file with this name didn’t exist in the previous commit.</p><p><strong>A — </strong>This refers to “Added File”. It means the files that are ready to be committed in the next commit.</p><p><strong>M — </strong>This refers to “Modified File”. It is for the files that existed in the previous commit but are now modified. (i.e., the file doesn’t match the file in the previous commit)</p><p><strong>D — </strong>This refers to “Deleted File”. It is attached to the file which was present in the previous commit but isn’t present now.</p><p>To check this, we can type <em>“git status”</em> in the terminal or cmd (while we have the git repo folder opened). All the status of the files and commit will be displayed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*Pcvynu8LJ95Qwd_5qC0yFQ.png" /></figure><p>For the next few commands, let’s try 2 approaches — <br> Approach 1 -&gt; manual labour by using cmd<br> Approach 2 -&gt; smart and less work by using VS Code shortcut</p><p><strong>Approach 1 (CMD)<br> git add<br> </strong>This command takes all the untracked files whose names you have mentioned and “adds them” i.e., prepares them to be committed. <strong><br> </strong>If we use <em>“git add .”</em> it will add all the files that are untracked. <br> If you want to add only a specific file, you can also do that by <em>“git add &lt;file name&gt;”</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*kTgKNXyEybjPuFKYKvL8Mw.png" /></figure><p><strong>git commit<br> </strong>This command takes all the added files and begins the commit process.</p><ol><li>Type <em>“git commit”</em></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/408/1*3vROlvskjDK1z3CZ7RI9tg.png" /></figure><p>2. A “Vim Text editor” is opened which asks you to enter a commit message. (This message will be displayed in GitHub and will help you to understand what the commit did as you can include small details like — “UI modified” or “Added readme”)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*ZkP17fWJR4lTjQ3DzBaRug.png" /></figure><p>3. Enter the message and click the escape key. This will bring the text pointer to the bottom of the command prompt and enter the “ ”</p><p>4. Type <em>“:wq”</em> in it. This saves the file and closes Vim.</p><p>5. Your commit will then be saved and also assigned the commit message and a unique number to identify it later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/580/1*jqJuifS68BZZAv7Uw2FLhA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*_evNzsQP4Za1AIvjgAZ-pA.png" /></figure><p><strong>git push<br> </strong>This command takes all the commits and then pushes them to the GitHub repository. This makes them available online for only you or the public to see depending on the privacy settings you set for your repo.</p><p>1. Type <em>“git push”</em></p><p>2. Watch a long list of lines being displayed that will show the progress of the push operation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/1*eVhf3m84unMb9nvvA2Ja4Q.png" /></figure><p><strong>git pull<br> </strong>This command is like the complete opposite of git push. It compares all the commits and if the local machine (i.e., your computer) is behind the repository, the commits are pulled, and the files are updated. <br> This makes working in a team easier as the progress can be updated and monitored very quickly without many hassles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/585/1*D1sP2dxWVvcJIjqRRu1JSQ.png" /></figure><p>(As a good git practice, I would advice you to not work on the same file in the repository as some other team member. This may lead to a headache worse than getting a girlfriend — <em>“merge conflicts”</em>)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/419/1*JIkL5K1IEdtykroM6mzAxA.png" /></figure><p><strong>Approach 2 (VS Code)</strong></p><p>1. Check you have Visual Studio Code installed and running.</p><p>2. Click on the “Open Folder” button and open the folder containing the repository.</p><p>3. <strong>Install Git Extension:</strong> In the Extensions view (Ctrl+Shift+X), search for Git related extensions. Popular ones include <em>“GitLens”</em> and <em>“GitHub Pull Requests and Issues”.</em> Install the one you prefer by clicking on the Install button next to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*5u8Qlu1okNnNZz6EygkdbQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*fcG0q6WEmFf0JvV4Xu7vyQ.png" /></figure><p>4. <strong>Commit Changes: </strong>In the Source Control view (Ctrl+Shift+G), you can see all the changes made to your files. You can directly commit all the changes by clicking on the Commit button. Add a commit message directly in the Source Control view. Just type your message in the textbox provided at the top and close the COMMIT_EDITMSG file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*GTWq3tEoVdHrUKJkaaUZVg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*jx0B44jmVA6w0zMlmZAn9w.png" /></figure><p>5. <strong>Push &amp; Pull Changes:</strong> Once committed, you can push your changes or pull the latest version to the remote repository by clicking the Sync Changes button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/505/1*mmr5HiwQrtvjv6bEHl3UXw.png" /></figure><p>Now, let’s explore another useful Git command:</p><p><strong>git switch<br> </strong>This command is used to switch between branches in your Git repository. It allows you to navigate between different versions of your project’s codebase. Here’s how to use it:</p><ol><li>To switch to an existing branch, simply type git switch &lt;branch name&gt; in your terminal or Git Bash. You can also view the branch names by using <em>“git branch” </em>command</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*mc_m7W7BZTBS1Qny0L0oVw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*Vm-zVnCM84dh6kf7Dcd7HQ.png" /></figure><p>2. To create and switch to a new branch simultaneously, you can use git switch -c &lt;new branch name&gt;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*2Cmtlf13ceeEmGWVnTLbJQ.png" /></figure><p>3. If you have uncommitted changes in your working directory, Git will prevent you from switching branches unless you either commit or stash those changes.</p><p>Understanding Git and GitHub is crucial for modern software development. Git provides version control capabilities, enabling teams to collaborate effectively and manage changes to their codebase. GitHub serves as a platform for hosting Git repositories, facilitating collaboration, code sharing, and project management.</p><p>By following the steps outlined in this blog post, you can set up Git, create a GitHub account, and start managing your projects with confidence. Whether you prefer the command line interface or the convenience of a graphical user interface like VS Code, Git offers powerful tools to streamline your development workflow.</p><p>Incorporating best practices such as using descriptive commit messages and avoiding merge conflicts will help ensure smooth collaboration within your team. So, dive into the world of Git and GitHub, and unlock the full potential of version control for your projects!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8193542d7f2c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring Flexbox and CSS Grid Layout]]></title>
            <link>https://ieee-tems-blogs.medium.com/exploring-flexbox-and-css-grid-layout-e2c3bc222162?source=rss-2b8c918acb5b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e2c3bc222162</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[css-grid]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[layout]]></category>
            <dc:creator><![CDATA[IEEE_TEMS BLOGS]]></dc:creator>
            <pubDate>Thu, 28 Mar 2024 12:37:22 GMT</pubDate>
            <atom:updated>2024-03-28T12:37:22.319Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*iiIERBUggsbWFFW8.png" /></figure><p>In the ever-evolving world of web design, creating flexible and responsive layouts has become paramount. Two powerful layout tools that have revolutionized front-end development are Flexbox and CSS Grid Layout. In this blog post, we will examine the possibilities and benefits of Flexbox and CSS Grid Layout, exploring their features, use cases, and how they can be combined to create dynamic and visually stunning web designs.</p><p><strong>1.Understanding Flexbox:</strong></p><p>Flexbox, short for Flexible Box Layout, is a one-dimensional layout model that allows for easy positioning and alignment of elements within a container. It is a powerful tool for creating responsive layouts, and it is supported by all major browsers.</p><p><strong>a. Flex Containers and Flex Items:</strong></p><p>The basic building blocks of Flexbox are flex containers and flex items.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*s-P-GvQqb_wQM-yAbqRMiA.png" /></figure><p>A <strong>flex container</strong> is an element that has the display: flex property applied to it.</p><p><strong>Flex items</strong> are the elements that are contained within a flex container.</p><p>Flex containers define the overall layout of the flex items. They can be arranged either in rows or columns, depending on the value of the flex-direction property.</p><p>Flex items are the elements that are placed within the flex container. They can be sized and aligned according to the values of the flex-grow, flex-shrink, and flex-basis properties</p><p><strong>b. Flexible Sizing and Alignment:</strong></p><p>Flexbox provides a number of properties for controlling the sizing and alignment of flex items. These properties include:</p><p><strong>flex-grow:</strong> This property controls how much space a flex item should take up when the flex container is resized.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*iOlhzVqWqWPwa9U8Xfem-g.png" /></figure><p><strong>flex-shrink:</strong> This property controls how much a flex item should shrink when the flex container is resized.</p><p><strong>flex-basis:</strong> This property controls the initial size of a flex item.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*Z0mnUj7ty22Hmknx_UE7rQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*XXGRdVyeLNOdxh-CDOZ2Qw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*WUzVdgMuwdt1M9hDoFMZCQ.png" /></figure><p><em>Here third item shrinks to a number 3 relative to other items.</em></p><p><strong>justify-content: </strong>This property controls how flex items are aligned horizontally within the flex container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*e3AuEPawUYZ8OBrXFRMJzQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/418/1*PP0d1G5mUFLmO3ifsaA46g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*Nip9AsVbNYQ5dJbRvqNhBQ.png" /><figcaption><em>The “justify-content: center;” aligns the flex items at the center of the container</em></figcaption></figure><p><strong>align-items:</strong> This property controls how flex items are aligned vertically within the flex container.</p><p><strong>C.</strong> <strong>Responsive Design with Flexbox:</strong></p><p>Flexbox is a powerful tool for creating responsive layouts. By combining Flexbox with media queries and other CSS properties, we can build designs that adapt to different screen sizes and devices.</p><p>Media queries allow us to apply specific styles based on the user’s device or viewport dimensions. By changing the flex container properties or overriding the item’s styles inside media queries, we can rearrange the layout, modify item sizes, or even change the direction of the flex container to create responsive designs.</p><p>Flexbox can also be combined with other CSS properties like “max-width” or “min-width” to control the behaviour of flex items at different screen sizes. By using media queries, we can define different flex container properties or adjust the flex item sizes to create fluid and adaptive layouts that respond to various screen sizes.</p><p>Take a look at the example below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*_DTWCNjDlO8M5qv-AGmRbQ.png" /></figure><p>In this example, we have a flex container with a class of <strong>.container</strong> and flex items with a class of. item. The flex items have a fixed width and height of 200 pixels, and a light blue background color. They also have a margin of 10 pixels to create some spacing between them.</p><p>The first media query targets screens smaller than 550 pixels in width. Inside this media query, we override the width of the flex items to be 100%, causing them to occupy the full width of the container and stack vertically.</p><p>The second media query targets screens between 551 and 1150 pixels in width. Inside this media query, we change the flex container’s <strong>flex-direction</strong> property to <strong>column</strong>, which causes the flex items to stack vertically instead of horizontally.</p><p>Using media queries in conjunction with Flexbox allows you to dynamically adjust layout and element sizes based on the user’s device or viewport dimensions, making your designs more responsive and adaptable to different screen sizes. Optimized.</p><p><strong>2.Harnessing the Power of CSS Grid Layout:</strong></p><p>CSS Grid Layout is a two-dimensional layout system that allows for complex grid-based designs. It provides precise control over both the rows and columns of a layout, enabling the creation of dynamic and responsive designs. Let’s explore some key points about CSS Grid Layout:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*GHJA9ssZjkmZ7rPPlNVu0w.png" /></figure><p><strong>a. Grid Containers and Grid Items:</strong></p><p>In CSS Grid Layout, we have grid containers and grid items.</p><p>A grid container is an element that serves as the parent of the grid layout. By applying the CSS property <strong>“display: grid”</strong> to the container, we activate the CSS Grid Layout. This transforms the container into a grid container.</p><p>Grid items are the individual elements contained within the grid container. They can be any HTML element. Each grid item occupies one or more cells within the grid. By default, grid items will flow into the grid in the order they appear in the source code, but we can explicitly position them using grid lines and grid cells.</p><p>Let’s consider an example to better understand this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/668/1*JP0lzIz5l31bNVg3lTVMrQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*-kxZSqa9rnVIW5bKTA0oWw.png" /></figure><p>We get the following grid through this code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*GyguJ2vawB92tF8OyeWjXQ.png" /></figure><p>In this example, we have a grid container with three columns defined using the grid-template-columns property, which specifies that each column should take up a fraction of the available space (1fr 2fr 1fr) which means first and third column takes 1/4th part each whereas second column takes 2/4th part. The container also has two rows defined using the grid-template-rows property, with fixed heights of 100px for the first row and 200px for the second row. The gap property sets a 10px gap between grid items.</p><p>The grid items (&lt;div&gt; elements with class grid-item) are the individual elements contained within the grid container. In this case, we have five grid items numbered from 1 to 5. By default, without explicit positioning, the grid items will flow into the grid in the order they appear in the source code.</p><p>The grid tracks are the spaces between the grid lines. The grid-template-columns property specifies that each column should take up an equal fraction of the available space (1fr), creating three equal-width columns. The grid-template-rows property sets the height of the rows to 100px and 200px.</p><p><strong>b. Grid Placement and Alignment:</strong></p><p>CSS Grid Layout provides various properties for precise placement and alignment of grid items within the grid container:</p><ul><li><strong>“grid-template-columns”</strong> and <strong>“grid-template-rows”</strong>: These properties allow us to define the structure of the grid by specifying the sizes of columns and rows. We can use fixed values, percentages, or the “fr” unit to create flexible and responsive grids.</li><li><strong>“grid-template-areas”</strong>: This property allows us to define named grid areas within the grid container. By assigning a name to each area and using the “grid-area” property on the grid items, we can easily position items within the grid.</li><li><strong>“justify-items”</strong> and “align-items”: These properties control the alignment of grid items within their respective grid cells. “justify-items” aligns items horizontally, and “align-items” aligns items vertically. Available values include “start,” “end,” “center,” “stretch,” and “baseline.”</li><li><strong>“grid-auto-flow”</strong>: This property controls the automatic placement of grid items when there is no explicit position defined. It has values like “row” (default), “column,” “row dense,” and “column dense,” which determine the flow direction and whether empty cells should be filled.</li></ul><p>Let’s understand these properties through a sample code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*kKYRX-5OgvyXviD6CIOPCA.png" /></figure><p>The <strong>grid-template-columns property</strong> defines three columns with widths set to a fraction of the available space (1fr, 2fr, and 1fr).</p><p>The <strong>grid-template-rows property</strong> defines two rows with fixed heights of 100px and 200px.</p><p>The <strong>grid-template-areas property</strong> assigns names to the grid areas within the grid container. We have a header area spanning three columns and one row, and a sidebar and main area spanning one column and two rows.</p><p>The <strong>justify-items property </strong>is set to center, which horizontally aligns the grid items within their respective cells.</p><p>The <strong>align-items property</strong> is set to center, which vertically aligns the grid items within their respective cells.</p><p>The <strong>grid-auto-flow property</strong> is set to column, which determines that additional grid items without an explicit position will be placed in new columns, flowing vertically.</p><p>The <strong>gap property</strong> sets a 10px gap between grid items.</p><p>By using the <strong>grid-area</strong> property on the grid items, we position them within the named grid areas defined in the grid-template-areas.</p><p>This example creates a grid layout with a header area spanning the top row, a sidebar on the left, and a main content area occupying the remaining columns and rows. The grid items are aligned both horizontally and vertically within their respective cells.</p><p><strong>C. Creating Responsive Grids:</strong></p><p>CSS Grid Layout excels in creating responsive designs. With media queries and a few additional techniques, we can make grids adapt to different screen sizes:</p><ul><li>Media queries: By using media queries, we can change the structure of the grid at specific breakpoints. We can modify the number of columns, change their widths, or even switch to a completely different grid layout.</li><li>The <strong>“minmax()” </strong>function: This function allows us to create flexible grid tracks that adapt to the available space. By defining a minimum and maximum size for a track, we ensure that it scales responsively.</li></ul><blockquote>grid-template-rows: minmax(100px, 1fr) 200px;</blockquote><p>Each column is defined with the minmax() function, which specifies a minimum width of 100px and a maximum width of 1fr (a fraction of the available space). This ensures that the columns scale responsively while never going below 100px in width.</p><ul><li>The <strong>“repeat()”</strong> notation: The “repeat()” function simplifies the creation of repetitive grid structures. It allows us to define the number of repetitions and the size of each repetition, reducing the need for manual track definitions.</li></ul><blockquote>grid-template-columns: repeat(3, minmax(100px, 1fr));</blockquote><p>The grid-template-columns property uses the repeat() notation to create three columns.</p><ul><li>The <strong>“fr”</strong> unit: The “fr” unit distributes the available space proportionally among the tracks. It enables us to create flexible grids that adjust to different screen sizes, accommodating additional content or resizing items.</li></ul><p>By combining these techniques, we can create grids that seamlessly adapt to various devices and screen sizes, providing a responsive and optimal user experience.</p><p><strong>3.Combining Flexbox and CSS Grid Layout:</strong></p><p>Flexbox and CSS Grid Layout can be used together to harness the full power of both layout systems and create powerful and flexible designs. Each layout system has its strengths, and knowing when to use one or the other, or even combining them, can lead to optimal results. Here are some key points to consider:</p><ul><li>Flexbox is great for arranging items along a single axis (either horizontally or vertically). It excels at creating flexible and dynamic layouts with equal-height columns, vertical centering, and easily controlling item ordering. Flexbox is especially useful for handling complex alignment and spacing requirements within a container.</li><li>CSS Grid Layout, on the other hand, is designed for two-dimensional layouts and excels at creating grid-based designs. It provides precise control over rows and columns, allowing for complex and versatile layouts. Grid Layout is particularly useful when working with grid-like structures, such as image galleries, pricing tables, or magazine-style layouts.</li></ul><p>By combining Flexbox and CSS Grid Layout, we can leverage the strengths of each system and create powerful and flexible designs. For example:</p><ul><li>We can use Flexbox inside a CSS Grid container to align and position items within individual grid cells. This allows for more fine-grained control over item placement and alignment.</li><li>We can use Flexbox to create flexible and responsive navigation menus or header sections within a CSS Grid layout.</li><li>We can use CSS Grid Layout to create a grid structure for a page layout and then use Flexbox to align and position elements within each grid area.</li></ul><p>The combination of Flexbox and CSS Grid Layout opens up a wide range of possibilities for creating modern and responsive web layouts. It allows designers and developers to take advantage of the strengths of each system and build robust and visually appealing interfaces. By understanding the capabilities of both Flexbox and CSS Grid Layout, we can choose the most appropriate layout system for each design scenario and achieve optimal results.</p><p><strong>Conclusion:</strong></p><p>Flexbox and CSS Grid Layout have changed the way web designers approach layout creation. Understanding their capabilities will help developers create responsive, visually appealing, and efficient web designs. Whether you’re creating flexible containers and tweaking them with Flexbox, or creating complex grid structures with CSS Grid Layout, these tools are essential for modern front-end development. By leveraging their strengths individually or in combination, developers can create engaging and adaptable layouts that improve the user experience on the web.</p><p>Mastering Flexbox and CSS Grid Layout opens up a world of possibilities that allow you to create dynamic and visually stunning web designs. So, take your front-end development skills to the next level with these powerful layout tools.</p><p><em>Happy coding!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e2c3bc222162" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>