<?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: Tyler Goulski</title>
    <description>The latest articles on DEV Community by Tyler Goulski (@tygoulski).</description>
    <link>https://dev.to/tygoulski</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%2F176531%2F324065a4-96e4-4cfd-920c-cb7d9022ae0c.png</url>
      <title>DEV Community: Tyler Goulski</title>
      <link>https://dev.to/tygoulski</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tygoulski"/>
    <language>en</language>
    <item>
      <title>Guide your Users with Two Lines of CSS</title>
      <dc:creator>Tyler Goulski</dc:creator>
      <pubDate>Thu, 01 Aug 2019 22:12:56 +0000</pubDate>
      <link>https://dev.to/tygoulski/guide-your-users-with-two-lines-of-css-2jjf</link>
      <guid>https://dev.to/tygoulski/guide-your-users-with-two-lines-of-css-2jjf</guid>
      <description>&lt;p&gt;Whether or not we realize it, we are often given multiple options for what action to take on a page. We are constantly being guided through a hierarchy where each action is on a predetermined scale of importance. A simple example of this can be seen at the Dev shop cart!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9D_XFZiK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mqrm9yk8gfavdt0855sa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9D_XFZiK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mqrm9yk8gfavdt0855sa.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;center&gt;&lt;sup&gt;good!&lt;/sup&gt;&lt;/center&gt;

&lt;p&gt;Using the example above, we can see that our primary action is the most &lt;strong&gt;obvious&lt;/strong&gt; button. The checkout button! We consider this our primary action, because the user clicking checkout is what is most anticipated in this situation. This is achieved by setting the &lt;code&gt;background-color&lt;/code&gt; property to #00e4ad and setting our &lt;code&gt;color&lt;/code&gt; property to white. Our secondary action is less apparent with the transparent background. The update button. The secondary action is the less obvious choice of the two.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KFkQmdGy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ayrbsp2hgeqrfp60a9h3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KFkQmdGy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ayrbsp2hgeqrfp60a9h3.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;center&gt;&lt;sup&gt;bad!&lt;/sup&gt;&lt;/center&gt;

&lt;p&gt;If we take the same example, but fill both buttons we are unable to determine which button holds higher importance, because it is unclear which button is more obvious. The two properties, &lt;code&gt;background-color&lt;/code&gt; and &lt;code&gt;color&lt;/code&gt; add such an importance to these buttons!   &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QQX0zjIM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/bj2w3euau0wvhfbcwqfo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QQX0zjIM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/bj2w3euau0wvhfbcwqfo.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;center&gt;&lt;sup&gt;bad!&lt;/sup&gt;&lt;/center&gt;

&lt;p&gt;Don't make the mistake of having the two buttons compete with each other! As you can see, neither of these button are obvious which is the primary action and the secondary action. One tactic to avoid this is to deemphasize the secondary action with a transparent background.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XsShXPPo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/hzm8w8gejsv5k3rajew5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XsShXPPo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/hzm8w8gejsv5k3rajew5.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;center&gt;&lt;sup&gt;good!&lt;/sup&gt;&lt;/center&gt;

&lt;p&gt;Another real world example of this can seen on the React website. The hero image contains two buttons, but the “Get Started” is clearly holding a greater importance over the “Take the Tutorial” button with the transparent background. &lt;/p&gt;

&lt;p&gt;Although this is just one approach to display primary and secondary buttons to our user, we can see how important the two CSS properties &lt;code&gt;background&lt;/code&gt; and &lt;code&gt;color&lt;/code&gt; help us guide the user.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>css</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
