<?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: Aituos</title>
    <description>The latest articles on DEV Community by Aituos (@aituos).</description>
    <link>https://dev.to/aituos</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%2F684511%2F272e3a9e-2c66-4562-a59b-8d3c584b2a30.png</url>
      <title>DEV Community: Aituos</title>
      <link>https://dev.to/aituos</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aituos"/>
    <language>en</language>
    <item>
      <title>Frotnend Mentor - 3 Column Preview Card Component</title>
      <dc:creator>Aituos</dc:creator>
      <pubDate>Tue, 24 Aug 2021 19:09:07 +0000</pubDate>
      <link>https://dev.to/aituos/frotnend-mentor-3-column-preview-card-component-a2m</link>
      <guid>https://dev.to/aituos/frotnend-mentor-3-column-preview-card-component-a2m</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S59_STs6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/51w9hdboghxakfqe0puv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S59_STs6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/51w9hdboghxakfqe0puv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3 Column Preview Card Component design from the website Frontend Mentor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.frontendmentor.io/challenges/3column-preview-card-component-pH92eAR2-"&gt;https://www.frontendmentor.io/challenges/3column-preview-card-component-pH92eAR2-&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see my finished version here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Aituos/FM--3-Column-Preview-Card-Component"&gt;Github repo&lt;/a&gt; | &lt;a href="https://aituos.github.io/FM--3-Column-Preview-Card-Component/"&gt;Live version&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was an easy challenge that didn't take long to complete. Sorry for the short post but I don't really think I've learned anything from it 😂&lt;/p&gt;

&lt;p&gt;Well, maybe I could've set up variables for the colors, or create classes for more elements (like the paragraphs), which is something I'd definitely do in a bigger project... but for something this small and quick I just didn't bother.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Frontend Mentor - Order Summary Component</title>
      <dc:creator>Aituos</dc:creator>
      <pubDate>Sun, 15 Aug 2021 18:41:49 +0000</pubDate>
      <link>https://dev.to/aituos/frontend-mentor-order-summary-component-3ffi</link>
      <guid>https://dev.to/aituos/frontend-mentor-order-summary-component-3ffi</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xyTHJBL3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/38wfqn7195baj1z4m08j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xyTHJBL3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/38wfqn7195baj1z4m08j.jpg" alt="The finished design"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Order Summary Component design from the website Frontend Mentor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.frontendmentor.io/challenges/order-summary-component-QlPmajDUj"&gt;https://www.frontendmentor.io/challenges/order-summary-component-QlPmajDUj&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see my finished version here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Aituos/FM--Order-Summary-Component"&gt;Github repo&lt;/a&gt; | &lt;a href="https://aituos.github.io/FM--Order-Summary-Component/"&gt;Live version&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This design wasn't that difficult to create, but it was definitely fun.&lt;/p&gt;

&lt;p&gt;The only problem I had was with the background, more specifically I didn't know how to position it to look exactly like the original design. So I looked at some of its' properties - &lt;code&gt;background-position&lt;/code&gt; and &lt;code&gt;background-size&lt;/code&gt; - more closely. I'm used to setting the position to &lt;code&gt;center&lt;/code&gt;, and the size to &lt;code&gt;cover&lt;/code&gt;, because it always did what I wanted 😆.&lt;/p&gt;

&lt;p&gt;Turns out it's possible to fine-tune the background's position. You can read more about it here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/background-position"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/background-position&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the end, I set the two properties like this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;background-position: top;&lt;/code&gt;&lt;br&gt;
&lt;code&gt;background-size: 100%;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And it worked like a charm. I think.&lt;/p&gt;

&lt;p&gt;One more thing I wanted to mention is that I recently found out you can set &lt;code&gt;aria-hidden="true"&lt;/code&gt; on any HTML elements that you want to hide from screen readers, such as decorative images, so I did just that. If you use it on images, you still have to include the alt text, but set it to an empty string:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;alt=""&lt;/code&gt;&lt;/p&gt;

</description>
      <category>frontendmentor</category>
      <category>webdev</category>
      <category>css</category>
    </item>
    <item>
      <title>Frontend Mentor - Stats Preview Card Component</title>
      <dc:creator>Aituos</dc:creator>
      <pubDate>Fri, 13 Aug 2021 15:38:02 +0000</pubDate>
      <link>https://dev.to/aituos/frontend-mentor-stats-preview-card-component-58mk</link>
      <guid>https://dev.to/aituos/frontend-mentor-stats-preview-card-component-58mk</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PJEKusl0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eyhz8uvtcwf56o9va5n9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PJEKusl0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eyhz8uvtcwf56o9va5n9.jpg" alt="The finished design"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Stats Preview Card Component design from the website Frontend Mentor.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.frontendmentor.io/challenges/stats-preview-card-component-8JqbgoU62"&gt;https://www.frontendmentor.io/challenges/stats-preview-card-component-8JqbgoU62&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see my finished version here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Aituos/FM--Stats-Preview-Card-Component"&gt;Github repo&lt;/a&gt; | &lt;a href="https://aituos.github.io/FM--Stats-Preview-Card-Component/"&gt;Live version&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For me, there were two challenges in this... uh, challenge, that I didn't really know how to tackle.&lt;/p&gt;

&lt;p&gt;First of all:&lt;/p&gt;

&lt;h2&gt;
  
  
  The image you get is in grayscale
&lt;/h2&gt;

&lt;p&gt;Okay cool, I thought, the solution would be to throw it into something like GIMP and just colorize it - but there's nothing to learn from that really. I already know how to do it. I knew it was possible to do this with just CSS and I recently saw a video on the very subject. Obviously I couldn't remember anything from the video, so I searched for it with no luck.&lt;/p&gt;

&lt;p&gt;(Takes a deep breath)&lt;br&gt;
The next hours were full of convoluted ideas involving absolute positioning of precisely-sculpted half-transparent pinkish divs over the image or using ::after pseudo-elements to achieve the desired end result and it was all &lt;em&gt;horrible&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;After two or three days I finally caved and looked for a solution on YouTube. This is the video I selected:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=2tlbKm8_4mg"&gt;https://www.youtube.com/watch?v=2tlbKm8_4mg&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I watched the first few minutes, then decided to get distracted and look at the comments. One comment in particular casually mentioned background-blend-mode.&lt;/p&gt;

&lt;p&gt;background-blend-mode...&lt;/p&gt;

&lt;p&gt;😩&lt;/p&gt;

&lt;p&gt;BACKGROUND BLEND MODE, oh my god.&lt;/p&gt;

&lt;p&gt;It was relatively quick and painless after that. I simply created a div, set its' background-image and background-color, and background-blend-mode to soft-light. I then tweaked the color to make it look as close to the preview as possible. Done. Three lines of code (and I think it might be possible to do with just two).&lt;/p&gt;

&lt;p&gt;Later on I also found out about mix-blend-mode, which would allow me to use an img element and colorize it, but for now I decided to just leave the divs.&lt;/p&gt;

&lt;p&gt;And the second issue was...&lt;/p&gt;

&lt;h2&gt;
  
  
  The layout itself
&lt;/h2&gt;

&lt;p&gt;The entire card is simple, but there's one element that changes its' position - the image. In the mobile version it's at the top, so naturally I'd place it at the beginning of html. But the desktop version has the image on the right, which means that in the html I'd place it at the end.&lt;/p&gt;

&lt;p&gt;Since you are given two images anyway, I decided to create two elements and hide them with "display: none" when needed.&lt;/p&gt;

&lt;p&gt;I'm honestly not sure how a problem like this could be solved otherwise. Imagine a website where the exact same image is supposed to appear in multiple places - depending on screen size and on what the user does. I mean, you can do it with just html and css, but I feel like javascript would be very helpful.&lt;/p&gt;

&lt;p&gt;Anyway, this made me think of a few things. First of all - if I hide something with "display: none", is it still visible to screen readers? Because that could lead to a lot of confusion... Fortunately the short answer is &lt;strong&gt;no&lt;/strong&gt;, it's as if the element was never there.&lt;/p&gt;

&lt;p&gt;Second of all - if one of the images is hidden right from the start, is it still downloaded and loaded in the background? Well, &lt;strong&gt;yes&lt;/strong&gt;. It is. But! There's a "picture" element that can be used to solve this problem. I haven't tried it myself yet, but there's a very good explanation of how it works on MDN:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture"&gt;https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture&lt;/a&gt;&lt;/p&gt;

</description>
      <category>frontendmentor</category>
      <category>webdev</category>
      <category>css</category>
    </item>
    <item>
      <title>This is my fox den</title>
      <dc:creator>Aituos</dc:creator>
      <pubDate>Wed, 11 Aug 2021 22:18:29 +0000</pubDate>
      <link>https://dev.to/aituos/this-is-my-fox-den-pl3</link>
      <guid>https://dev.to/aituos/this-is-my-fox-den-pl3</guid>
      <description>&lt;p&gt;👀&lt;/p&gt;

&lt;p&gt;Hey, welcome to my little blog. I'm learning HTML, CSS and javascript, planning to introduce things like SASS and React later on. My long-term goal is to find a job as a front-end developer, or become a freelancer.&lt;/p&gt;

&lt;p&gt;So, that's what you can expect to find here - posts about my experiences, my progress, the projects I'm working on (or that I already completed), and so on!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
