<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Emmanuel Mendoza</title>
    <description>The latest articles on DEV Community by Emmanuel Mendoza (@emmanuelmendoza).</description>
    <link>https://dev.to/emmanuelmendoza</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1106000%2Fd3375fb3-d9e0-48df-9400-4a5e3f716b27.png</url>
      <title>DEV Community: Emmanuel Mendoza</title>
      <link>https://dev.to/emmanuelmendoza</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/emmanuelmendoza"/>
    <language>en</language>
    <item>
      <title>AI Breakthroughs You Need to Know: The Future is Now</title>
      <dc:creator>Emmanuel Mendoza</dc:creator>
      <pubDate>Tue, 28 Jan 2025 16:53:42 +0000</pubDate>
      <link>https://dev.to/emmanuelmendoza/ai-breakthroughs-you-need-to-know-the-future-is-now-b71</link>
      <guid>https://dev.to/emmanuelmendoza/ai-breakthroughs-you-need-to-know-the-future-is-now-b71</guid>
      <description>&lt;p&gt;The AI world has been buzzing with excitement this month, and it’s not just the tech giants in Silicon Valley making waves. From new tools for developers to revolutionary platforms that could reshape how we browse the web, the AI race is accelerating—and we need to pay attention. Let’s dive into the latest developments and what they mean for us as web professionals.&lt;/p&gt;

&lt;h3&gt;
  
  
  TRAE AI: TikTok's AI-Powered Code Editor
&lt;/h3&gt;

&lt;p&gt;First up, TikTok surprised everyone by releasing its very own AI-powered code editor for free. Yes, TikTok—the social media platform known for its viral videos—is now a player in the developer tools space. This editor is packed with features that rival popular tools like Cursor and even VS Code with Copilot.&lt;/p&gt;

&lt;p&gt;Imagine creating clean, efficient code in a fraction of the time, all thanks to advanced AI suggestions and seamless integrations. Whether you're debugging, prototyping, or writing production-level code, TikTok’s tool is a game changer—and it’s free! If this isn’t a sign to start leveraging AI in our workflows, what is?&lt;/p&gt;

&lt;h3&gt;
  
  
  OpenAI Operator: The Future of Browsing?
&lt;/h3&gt;

&lt;p&gt;Next, OpenAI has introduced the OpenAI Operator, which many are calling the "new way to browse" in 2025. This isn’t just an incremental upgrade; it’s a paradigm shift. Imagine a browsing experience where search results are not just listed but contextualized, personalized, and presented with actionable insights—all powered by cutting-edge AI.&lt;/p&gt;

&lt;p&gt;Some are even speculating this could mark the beginning of the end for traditional search engines like Google. The Operator redefines what it means to interact with information online, making browsing more intuitive, efficient, and intelligent. If you’re not already exploring AI-enhanced tools, you’re missing out on the future of web interaction.&lt;/p&gt;

&lt;h3&gt;
  
  
  DeepSeek R1: China’s Open Source Contender
&lt;/h3&gt;

&lt;p&gt;And just when we thought the month couldn’t get any more exciting, China enters the spotlight with DeepSeek R1. This new AI platform directly competes with OpenAI’s o1, and it’s making waves for all the right reasons. What sets DeepSeek R1 apart? It’s open source, which means you can download it, run it locally, and even commercialize it. Yes, it’s free, and the API pricing is remarkably affordable.&lt;/p&gt;

&lt;p&gt;DeepSeek R1 isn’t just a technological feat; it’s a statement. China is stepping up as a serious competitor in the AI race, and by making this tool accessible, they’re ensuring that innovation isn’t limited to those with deep pockets. For developers, businesses, and enthusiasts alike, this opens up a world of possibilities.&lt;/p&gt;

&lt;h3&gt;
  
  
  Embrace the Present: AI is Here
&lt;/h3&gt;

&lt;p&gt;The takeaway from all these breakthroughs is clear: AI isn’t the future anymore—it’s the present. From TikTok’s free code editor to OpenAI’s game-changing browsing platform and China’s open-source revolution, the pace of innovation is staggering. And this is just the beginning.&lt;/p&gt;

&lt;p&gt;As software professionals, we have a choice: adapt or be left behind. AI tools are no longer optional—they’re essential for maximizing productivity, staying competitive, and delivering value to clients. Let’s commit to learning and leveraging these technologies. The AI race is on, and the best way to stay ahead is to dive in.&lt;/p&gt;

&lt;p&gt;Remember, this isn’t about replacing us; it’s about empowering us to do more, faster, and better. Let’s lead the way in embracing AI and ensuring our skills and practices remain at the cutting edge.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>productivity</category>
      <category>deepseek</category>
    </item>
    <item>
      <title>UI Challenge - Elevate CSS masking techniques - Pt2</title>
      <dc:creator>Emmanuel Mendoza</dc:creator>
      <pubDate>Tue, 27 Jun 2023 17:57:07 +0000</pubDate>
      <link>https://dev.to/emmanuelmendoza/ui-challenge-elevate-css-masking-techniques-pt2-5edn</link>
      <guid>https://dev.to/emmanuelmendoza/ui-challenge-elevate-css-masking-techniques-pt2-5edn</guid>
      <description>&lt;p&gt;In this post I will be showing a use case for the &lt;a href="https://dev.to/emmanuelmendoza/ui-challenge-elevate-css-masking-techniques-5dk6"&gt;Avatar component just built on previous post&lt;/a&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  The Grid
&lt;/h2&gt;

&lt;p&gt;Our goal is building a Grid component that will take Avatars with some additional text info as children, to then add some cool video playing in the background. In order to achieve this the following steps will be performed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an Avatar Card component that will be using the Avatar component followed by 2 text fields holding the Name and Role info.&lt;/li&gt;
&lt;li&gt;Putting a couple of Avatar Card components together in a grid.&lt;/li&gt;
&lt;li&gt;Adding a video that will be playing nicely and quietly in the page background.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;While on paper it seems to be quite normal html/css coding, some complications were hit down the road as I couldn't use any background on any Avatar parent element to produce the desired effect.&lt;br&gt;
When coding a web component, I try to maximize the HTML/CSS code but sometimes JS is the cleanest and simplest way to achieve certain functionallity as in this case. I was looking for creating a Grid component where items are centered (just like CSS Grid justify-content: center property does) but after some attempts using CSS only, and keeping in mind that we need to make the Grid responsive and flexible (Grid component is not aware of children element size) I realized that JS will be the best way to go. Once again, I like to keep the code as readable and clean as possible, and that includes CSS code (and here is where using the shape to clip all outside content rathen that creating a new shape - e.g. an square containing an hexagon - and be able to manage the aspect ratio of it take relevance, as the mask container can horizontally grow as much as needed without affecting the shape aspect ratio, so we don't need any extra empty side elements to get the same element growing effect), so if CSS is getting too complicated I tend to reconsider the implementation design but of course, this is just a personal coding style choice.&lt;/p&gt;

&lt;p&gt;So, in order to get items sorted in a centered fashion, I created the below component (made it with React TS). Below is the code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;SideGrowingGrid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;FC&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;SideGrowingGridProps&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;coverColor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="p"&gt;}):&lt;/span&gt; &lt;span class="nx"&gt;ReactElement&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;gridRef&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useElementSize&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;itemRef&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;iWidth&lt;/span&gt; &lt;span class="p"&gt;}]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;useElementSize&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;childs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;JSX&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Element&lt;/span&gt;&lt;span class="p"&gt;[]).&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[(&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;JSX&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Element&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nx"&gt;JSX&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Element&lt;/span&gt;&lt;span class="p"&gt;[];&lt;/span&gt; 
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="na"&gt;itemsPerRow&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;iWidth&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;childs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;iWidth&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;floor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;iWidth&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sgg-container&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
            &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;gridRef&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="p"&gt;([...&lt;/span&gt;&lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ceil&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;childs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;itemsPerRow&lt;/span&gt;&lt;span class="p"&gt;))]).&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;  &lt;span class="p"&gt;(&lt;/span&gt;
                    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sgg-row&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;&lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;coverColor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;flexGrow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;                    &lt;span class="p"&gt;{&lt;/span&gt;      
                        &lt;span class="nx"&gt;childs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;itemsPerRow&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;itemsPerRow&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;itemsPerRow&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;child&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
                            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="nx"&gt;ref&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;itemRef&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                                &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;child&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
                            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;                        &lt;span class="p"&gt;))&lt;/span&gt;
                    &lt;span class="p"&gt;}&lt;/span&gt;
                        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;&lt;span class="na"&gt;backgroundColor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;coverColor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;flexGrow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;                    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;                &lt;span class="p"&gt;))&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Component is quite simple:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use custom hooks to get the Grid size and Grid items size (Note: It assumes all items have the same size).&lt;/li&gt;
&lt;li&gt;Compute the number of items per Grid row to later create row elements that wraps such children accordingly.&lt;/li&gt;
&lt;li&gt;Add empty elements in the beginnig and the end of each row that grow and cover the Grid far ends using whatever color it's passed as component property.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it, we have our Grid component ready! Nonetheless if you are fine with the items sorting like the CSS Grid - Space Around does, it's quite easy to implement it using CSS only. You can check below Pen implementation and play with it.&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/emmanu3l/embed/LYXbOrb?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;
&lt;h2&gt;
  
  
  Imagination is limitless
&lt;/h2&gt;

&lt;p&gt;Now we have the Grid component, we just need to add a cool background to get most of it. In the company's website we used something subtle (an animated gradient and doodle background), but for this use case, I added a video where visitor can easily tell all Avatars are sharing the same background. &lt;/p&gt;

&lt;p&gt;You can take a look to the full implementation &lt;a href="https://github.com/emmanuel-mendoza/avatar-grid"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And in below link you can check the live result:&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://avatar-grid.vercel.app/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--3J3NWPHX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://res.cloudinary.com/dmela7d4j/image/upload/v1687803053/avatar-grid/avatar-grid-cover.png" height="435" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://avatar-grid.vercel.app/" rel="noopener noreferrer" class="c-link"&gt;
          Avatar Grid
        &lt;/a&gt;
      &lt;/h2&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
        avatar-grid.vercel.app
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;&lt;a href="https://dev.to/emmanuelmendoza/ui-challenge-elevate-css-masking-techniques-5dk6"&gt;&amp;lt; UI Challenge - Elevate CSS masking techniques - Pt1&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Thank you
&lt;/h5&gt;

&lt;p&gt;That's it, I hope you find this post useful and if you have some cool use case ideas don't hesitate to share them! If you want to connect, you can find me in &lt;a href="https://www.linkedin.com/in/emmanuel-mendoza-0a0b1393"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>ui</category>
      <category>web</category>
    </item>
    <item>
      <title>UI Challenge - Elevate CSS masking techniques</title>
      <dc:creator>Emmanuel Mendoza</dc:creator>
      <pubDate>Mon, 26 Jun 2023 23:45:34 +0000</pubDate>
      <link>https://dev.to/emmanuelmendoza/ui-challenge-elevate-css-masking-techniques-5dk6</link>
      <guid>https://dev.to/emmanuelmendoza/ui-challenge-elevate-css-masking-techniques-5dk6</guid>
      <description>&lt;h2&gt;
  
  
  The premise
&lt;/h2&gt;

&lt;p&gt;I am currently working for an IT company that few months ago started a re-branding project. As the lead of the company's Web practice, I worked shoulder-to-shoulder with the head of the Design Guild to make sure the new brand of the company reflects our status and true potential to the world. As all projects of this nature, we were holding regular meetings with the Design team, to review their designs and their expected functionality.&lt;/p&gt;

&lt;h2&gt;
  
  
  The challenge
&lt;/h2&gt;

&lt;p&gt;During one of those meetings, the Design team came up with the following piece:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4Fa_uP98--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7tmbjx04cjhb3y016l0x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4Fa_uP98--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7tmbjx04cjhb3y016l0x.png" alt="Image description" width="800" height="606"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At first sight, it looks like a regular design till they explained something that changed everything; the idea is that &lt;em&gt;all avatars&lt;/em&gt; (as they’re meant to show people pics) &lt;em&gt;share the same background of whatever element it's behind&lt;/em&gt; (per design, we will be using a gradient and a doodle as background); this implies each avatar background will look different in each device as their position will vary depending on the viewport size.&lt;br&gt;
At that point, we had not realized the challenge the design team put in front of us, it was till we started to brainstorm about how to implemenat it that we figured it was not going to be that simple. This component caught my attention as I had never built one like this before so I took it for myself.&lt;br&gt;
Before jumping to the technical solution, it's worth to mention some relevant facts related to it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The component is used in several pages and the shape (e.g. hexagon) is different in some of them.&lt;/li&gt;
&lt;li&gt;The shape is used for another website components.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  The solution
&lt;/h2&gt;

&lt;p&gt;Now let's talk about the solution; for this, we are going to need 2 components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Avatar component&lt;/li&gt;
&lt;li&gt;The Avatar Grid component&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But first, in case you are like me, a desperate person, you could take a look to an &lt;a href="https://avatar-grid.vercel.app/"&gt;implemented use case here&lt;/a&gt;. Now lets begin.&lt;/p&gt;
&lt;h3&gt;
  
  
  The Avatar component
&lt;/h3&gt;

&lt;p&gt;Our goal is creating a visual effect that a person is coming out of the shape. In order to achieve that I needed 3 layers:&lt;/p&gt;
&lt;h5&gt;
  
  
  Back Layer - The shape container
&lt;/h5&gt;

&lt;p&gt;For this layer I needed to consider the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The solution should allow to manage the shape aspect ratio regardless of its size (this way the component responsiveness will be easy to handle)&lt;/li&gt;
&lt;li&gt;The solution should allow to use a shape and clip whatever is outside of it as shapes are used in another web components (creating a new shape would be an alternative but it would bring another complications when using it in a grid and also would take the fun away of it). 
And after some reading/researching/coding, I came up with the piece of CSS code that did the trick:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.masked&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;mask-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url(https://atwebsite.blob.core.windows.net/images/hexagon.svg)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;linear-gradient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;mask-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;100%&lt;/span&gt; &lt;span class="n"&gt;-&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;100%&lt;/span&gt; &lt;span class="n"&gt;-&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="m"&gt;120%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;mask-composite&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;exclude&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;mask-origin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;content-box&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;mask-repeat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;no-repeat&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;mask-position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This CSS tecnique allows to take several shapes (in this case we are using an hexagon and the square drawed by the gradient) and clip whatever portion of the element where shapes are not colliding.&lt;/p&gt;

&lt;p&gt;This approach perfectly fits the solution needs mentioned above.&lt;/p&gt;
&lt;h5&gt;
  
  
  Middle Layer - The picture container
&lt;/h5&gt;

&lt;p&gt;The second layer will hold the picture, there is not much going on here, just usual CSS. I scaled the picture up so it's always bigger than the shape which is needed for the coming out of the shape effect.&lt;/p&gt;
&lt;h5&gt;
  
  
  Front Layer - The bottom half of the shape container
&lt;/h5&gt;

&lt;p&gt;As you could imagine, I just simple reused the shape container built in the first layer but also added a parent (container) so I can handle the portion of the picture I want to be covered from the bottom to the top.&lt;/p&gt;

&lt;p&gt;Below you'll find a Pen with a full implementation of this component and a couple of CSS variables you can play with.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/emmanu3l/embed/ExONWeo?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/emmanuelmendoza/ui-challenge-elevate-css-masking-techniques-pt2-5edn"&gt;UI Challenge - Elevate CSS masking techniques - Pt2 &amp;gt;&lt;/a&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Thank you
&lt;/h5&gt;

&lt;p&gt;That's it for our first piece of this solution, I hope you are finding this post useful and if you want to connect, you can find me in &lt;a href="https://www.linkedin.com/in/emmanuel-mendoza-0a0b1393"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>web</category>
      <category>ui</category>
      <category>uidesign</category>
    </item>
  </channel>
</rss>
