Skip to content

Instantly share code, notes, and snippets.

<!-- Element selectors -->
p, a, body, html
<!-- Descendant selectors -->
ul li { ... }
<!-- Child selectors -->
ul > li { ... }
<!-- Attribute selectors -->
.header {
width: 960px;
margin: 0 auto;
}
.footer {
margin-top: 30px;
}
.article {
.gradient {
background-image: -o-linear-gradient(bottom, #8A858B 0%, #A6A0A7 100%);
background-image: -moz-linear-gradient(bottom, #8A858B 0%, #A6A0A7 100%);
background-image: -webkit-linear-gradient(bottom, #8A858B 0%, #A6A0A7 100%);
background-image: -ms-linear-gradient(bottom, #8A858B 0%, #A6A0A7 100%);
background-image: linear-gradient(to bottom, #8A858B 0%, #A6A0A7 100%);
}
.box {
border: 1px solid #aaa;
<nav>
<li>Home</li>
<li class="active">About</li>
<li>Contact</li>
</nav>
.active {
background: red;
}
gem 'rack-contrib'
group :development do
gem 'unicorn'
end
require 'rack'
require 'rack/contrib/try_static'
use ::Rack::TryStatic,
:root => "build", # where middleman files are generated
:urls => %w[/] # match all requests
:try => ['.html', 'index.html', '/index.html'] # try these postfixes sequentially
# 404
run lambda { [404, {'Content-Type' => 'text/plain'}, [' File not found.']]}
<!--SEO Optimized-->
<div class="header"></div>
<div class="content">
<p>Lorem ipsum.</p>
</div>
<div class="sidebar"></div>
<div class="content">
<p>Lorem ipsum.</p>
</div>
<div class="header"></div>
<div class="sidebar"></div>
<div class="footer"></div>
<!-- Border w/o pseudo elements -->
<style>
.separator {
width: 100%;
height: 1px;
background: #000;
}
</style>
<div class="content">
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/main.css">