Skip to content

Instantly share code, notes, and snippets.

@willwright82
Created July 23, 2014 14:16
Show Gist options
  • Save willwright82/94e5783db9547f4b0046 to your computer and use it in GitHub Desktop.
Save willwright82/94e5783db9547f4b0046 to your computer and use it in GitHub Desktop.
SASS basic syntax
/* Variables */
$font-stack: Helvetica, sans-serif
$primary-color: #333
body
font: 100% $font-stack
color: $primary-color
/* Nesting */
nav
ul
margin: 0
padding: 0
list-style: none
li
display: inline-block
a
display: block
padding: 6px 12px
text-decoration: none
/* Import */
@import reset
/* Mixins */
=border-radius($radius)
-webkit-border-radius: $radius
-moz-border-radius: $radius
-ms-border-radius: $radius
border-radius: $radius
.box
+border-radius(10px)
/* Extend */
.message
border: 1px solid #ccc
padding: 10px
color: #333
.success
@extend .message
border-color: green
.error
@extend .message
border-color: red
.warning
@extend .message
border-color: yellow
/* Operators */
.container
width: 100%
article[role="main"]
float: left
width: 600px / 960px * 100%
aside[role="complimentary"]
float: right
width: 300px / 960px * 100%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment