Simple Site: Set Up Styles

Before we get started with the header itself, we need to import our CSS reset file. You’ll find it at the top of main.scss (in assets/stylesheets). The reset file “flattens” all styles (usually added by browsers) so you can start with a blank slate.

To the blank slate, you can add some base styles for your project. To keep things simple, just copy the sample styles below and add it to your _base.scss file (in assets/stylesheets/globals).

Show me the final version of _base.scss that I’ll be using.
// Site-wide styles go here

@import "bourbon/bourbon";
@import "vertical_rhythmic";

$orange: #F36721;
$blue: #3CA3E0;
$green: #78C158;
$red: #D43631;
$yellow: #FFF200;

$d_gray: #808080;
$gray: #bbb;
$l_gray: #ccc;

body {
  font-family: Arial, Helvetica, sans-serif;
  color: #333;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100%;
  background: white;
  -webkit-text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  font-smoothing: antialiased;

  a {
    color: darken($blue, 10%);
    text-decoration: none;
  }
  #main {
    margin: 10px;
    overflow: hidden;
  }

  > iframe {
    display: none;
  }

  article.post {
    border-bottom: 1px solid #ddd;
    padding: 10px 0 10px 0;
    &:first-child {
      padding-top: 0;
    }
    .post-holder {
      .date, .meta {
        color: $gray;
        font-size: 12px;
        text-transform: uppercase;
      }

      h1 {
        font-size: 28px;
        line-height: 1.2;
        color: $orange;
        a {
          color: $orange;
        }

      }
      .meta {
        overflow: hidden;
        margin-top: 5px;
        > a, > ul li {
          float: left;
          margin-right: 20px;
        }
        .cat_name {
          span {
            color: #bbb;
          }
        }
      }
    }
  }

  // Search Result header
  #main .post {
    &.results {
      padding: 20px 0;
      color: #656565;
      h1 {
        font-size: 18px !important;
        em {
          font-style: normal;
        }
        span {
          color: #484848;
        }
      }
      p {
        span {
          color: #515151;
        }
      }
    }
  }

  // Pagination
  .paging {
    text-align: right;
    font-size: 16px;
    padding: 22px 0 23px;
    text-transform: uppercase;

    li {
      display: inline-block;
      vertical-align: middle;
      margin: 0 0 0 18px;
      &.previous { margin-left: 0; }
      &.next { margin: 0 0 0 14px; }
      &.previous span { padding: 0 0 0 11px; }
      &.next span { padding: 0 12px 0 0; }
      a { color: #333; }
      &.active {
        font-size: 18px;
        line-height: 30px;
        width: 30px;
        height: 30px;
        text-align: center;
        color: #fffefe;
        text-shadow: 0 1px 1px #00629c;
        background: #3da3e0;
        border-radius: 100%;
        -webkit-border-radius: 100%;
        @include box-shadow(0 1px 1px #333);

      }
    }
  }
}

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
    *zoom: 1;
}


.mw_testing {
  border: 2px solid purple !important;
  background: #999;
  overflow: hidden;
}

With base styles added

Once those styles have been added, you can start transforming the homepage using Tritium. When working on a mobile site, you should start with the header — and that’s what the next lab will cover.