JSFiddle - React, Tailwind, and code Playground

by Jordan Hawker

HTML

<script src="//use.typekit.net/rzv2mwh.js"></script>
<script>try{Typekit.load();}catch(e){}</script>


<div class="container">
  <h1>Recreate this using HTML &amp; CSS</h1>
  <img src="https://s3.amazonaws.com/f.cl.ly/items/2z3C3Z0L2Q0R282p1V0z/Image%202014-12-19%20at%2010.07.09%20AM.png" width="303" />
  
  <div class="notification">
    <div class="dollar-count">
      167 still needed
    </div>
    <div class="content">
      <div class="countdown-bar countdow-bar--filled">
      </div>
      <div class="countdown-bar countdow-bar--empty">
      </div>
      <div class="copy">
        <p class="copy__text copy__text--red">
          Only 3 days left
        </p>
        <p class="copy__text">
          to fund this project.
        </p>
      </div>
      <input class="input" placeholder="50">
      <a class="button-green">
        Give now
      </a>
      <a class="more-info">Why give 50?</a>
    </div>
    <div class="actions">
      <a class="button-gray">Save for later</a>
      <a class="button-gray">Tell your friends</a>
    </div>
  </div>
  
</div>

SCSS

/* Global resets */
* {box-sizing: border-box; margin: 0; padding: 0;}
body {font-family: "rooney-sans", Avenir-Book, Calibri, sans-serif; color: #424242; line-height: 1.4;}

/* Fonts */
h1 {
  font-family: "rooney-web", 'AmericanTypewriter', Rockwell, serif;
  font-size: 2.5em;
  font-weight: bold;
}

.container {
  margin: 2em auto;
  max-width: 630px;
  text-align: center;
}

/* COLORS: 
  blue: #20A1D4;
  green: #1CBC2C;
  orange: #EF5F3C;
  black: #424242;
  grey: #777;
  light grey: #eaeaea;
*/

/* Your CSS goes here */
.notification {
  background-color: #fff;
  width: 60%;
  margin: auto;
}

.dollar-count {
  background-color: #424242;
  color: #fff;
  width: 80%;
  margin: auto;
  padding: 5px 0px;
}

.content {
  width: 80%;
  margin: auto;
  border: 1px solid #777;
  padding: 20px;
  text-align: left;
}

.countdown-bar {
  height: 10px;
  border: 1px solid #eaeaea;
  display: inline;
}

.countdown-bar-filled {
  width: 80%;
  background-color: #EF5F3C;
}

.countdown-bar-empty {
  width: 20%;
  background-color: #fff;
}

.copy {
  color: #777;
}

input {
  padding: 8px 5px;
}

.button-green {
  background-color: #1CBC2C;
  color: #fff;
  padding: 8px;
  border-radius: 3px;
}

.actions {
  margin-top: 20px;
}
.button-gray {
  background-color: #eaeaea;
  border: 1px solid #777;
  padding: 5px;
}

.copy__text {
  display: inline;
}

.copy__text--red {
  color: #EF5F3C;
}

.more-info {
  color: #20A1D4;
  font-style: italic;
  display: block;
  text-align: left;
  
}