<?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: Ben Lardie</title>
    <description>The latest articles on DEV Community by Ben Lardie (@benlardie).</description>
    <link>https://dev.to/benlardie</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%2F267865%2Fefc86fee-da6b-4a1b-977a-c6f5e5e2e55e.jpg</url>
      <title>DEV Community: Ben Lardie</title>
      <link>https://dev.to/benlardie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/benlardie"/>
    <language>en</language>
    <item>
      <title>CSS Art</title>
      <dc:creator>Ben Lardie</dc:creator>
      <pubDate>Wed, 11 Mar 2020 16:58:58 +0000</pubDate>
      <link>https://dev.to/benlardie/css-art-32i0</link>
      <guid>https://dev.to/benlardie/css-art-32i0</guid>
      <description>&lt;p&gt;I have always enjoyed writing CSS to create clean functional websites but could see that it potential to do a lot more. I was first introduced to CSS Art in this &lt;a href="https://www.vice.com/en_us/article/9kgx7p/painting-made-with-code-html-pure-css-browser-art-diana-smith" rel="noopener noreferrer"&gt;article&lt;/a&gt;. I couldn't believe Diana was able to create such beautiful images using just CSS.  &lt;/p&gt;

&lt;p&gt;I found it very inspiring and wanted to try and create my own art. I thought for my first piece I would do a portrait of a true American Hero, Homer J Simpson. &lt;/p&gt;

&lt;p&gt;Homer is a great subject for my first portrait because of his simplicity. His face can be broken down into 8 shapes or so. I was able to accomplish it with 12 different divs. I also took advantage of pseudo elements ::before and ::after whenever I could such as his eyes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.eyes {
  height: 100px;
  width: 100px;
  background-color: white;
  border-radius: 100%;
  position: absolute;
  border: 8px solid black;
  z-index: 2;
}

.eyes::before {
  content: '';
  height: 20px;
  width: 20px;
  background-color: black;
  z-index: 4;
  border-radius: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The before element aloud me to make the pupils without having to create more div's. The more I work with CSS the more I learn that those pseudo elements are your best friend. I have included a picture of my portrait so far although it's still a work in progress. He kind of looks a little counterfeit but I like him. Here is also the link to the &lt;a href="https://codepen.io/benlardie/full/wvayaNg" rel="noopener noreferrer"&gt;codepen&lt;/a&gt; I am going to continue to clean it up. I am also thinking about trying to make some Marvel characters next. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8ygt711lf9ken6bn24j0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F8ygt711lf9ken6bn24j0.png" alt="Homer Simpson"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>codepen</category>
    </item>
  </channel>
</rss>
