@maxinacube
Lead Front-End Developer
@jeffgolenski
Design + Front-End Developer
- Hampton Catlin
$pink: #c6538c;
$blue: #036;
$primary: $pink;
$secondary: $blue;
h1, h2, a {
color: $primary;
}
a:hover {
color: $secondary;
}
.button {
background: $secondary;
}
h1, h2, a {
color: #c6538c;
}
a:hover {
color: #036;
}
.button {
background: #036;
}
Sass
CSS
$pink: #c6538c;
$blue: #036;
$primary: $pink;
$secondary: $blue;
h1, h2, a {
color: $primary;
}
a:hover {
color: $secondary;
}
.button {
background: $secondary;
color: legible( $secondary );
}
h1, h2, a {
color: #c6538c;
}
a:hover {
color: #036;
}
.button {
background: #036;
color: #eee;
}
@function legible ( $color ) {
@if ( lightness( $color ) < 50% ) {
@return #eee;
} @else {
@return #111;
}
}
Sass
CSS
$pink: #c6538c;
$primary: $pink;
@mixin button ( $background: $primary, $color: white ) {
background-color: $background;
border: 1px solid darken( $background, 15% );
color: $color;
display: inline-block;
padding: 8px 10px;
text-decoration: none;
}
.button {
@include button;
}
.button {
background-color: #c6538c;
border: 1px solid #9a3366;
color: white;
display: inline-block;
padding: 8px 10px;
text-decoration: none;
}
Sass
CSS
$magic: (
'variables',
'operations',
'functions',
'directives',
'output',
);
CodeKit is a paid Mac app that will compile your Sass without terminal.
CodeKit can also compile JS and live-refresh changes in your browser.
incident57.com/codekit
Compass is a light-weight compiler, and hands down the easiest to use when starting a new project.
Once installed, simply run compass init
in terminal to start a new Compass project.
compass-style.org
Grunt is the most powerful, and also the most complicated of the compilers.
Grunt allows you to set-up many tasks other than Sass. Use Grunt to minify images, create icon fonts, and sniff your code for errors. There's almost no limit with Grunt.
gruntjs.com
Jetpack is one of the most powerful plugins offered in WordPress, and you can start using Sass with any theme as quick as you can install Jetpack.
Simply activate the Custom CSS feature and you'll find a CSS Editor under your appearance menu.
Best of all, it's free and has a full support team.
jetpack.me/support/custom-css
CodePen gives you preprocessors for CSS, Javascript and HTML, and also generates a live preview.
CodePen is my favorite tool to utilize when I need to build out a concept, it is great for rapid iterations and testing out new methods.
codepen.io
https://github.com/laras126/simple-sassy-starter/blob/master/scss/_shame.scss
sass-lang.com/community
css-tricks.com/snippets/sass/
thesassway.com