Last active
August 29, 2015 14:06
-
-
Save kirkas/2fc673be51f48a86b790 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button class="btn btn--default btn--small">Button</button> | |
<button class="btn btn--default--outline btn--small">Button</button> | |
<br> | |
<button class="btn btn--default btn--regular">Button</button> | |
<button class="btn btn--default--outline btn--regular">Button</button> | |
<br> | |
<button class="btn btn--default btn--medium">Button</button> | |
<button class="btn btn--default--outline btn--medium">Button</button> | |
<br> | |
<button class="btn btn--default btn--large">Button</button> | |
<button class="btn btn--default--outline btn--large">Button</button> | |
<br><br> | |
<button class="btn btn--success btn--small">Button</button> | |
<button class="btn btn--success--outline btn--small">Button</button> | |
<br> | |
<button class="btn btn--success btn--regular">Button</button> | |
<button class="btn btn--success--outline btn--regular">Button</button> | |
<br> | |
<button class="btn btn--success btn--medium">Button</button> | |
<button class="btn btn--success--outline btn--medium">Button</button> | |
<br> | |
<button class="btn btn--success btn--large">Button</button> | |
<button class="btn btn--success--outline btn--large">Button</button> | |
<br><br> | |
<button class="btn btn--warning btn--small">Button</button> | |
<button class="btn btn--warning--outline btn--small">Button</button> | |
<br> | |
<button class="btn btn--warning btn--regular">Button</button> | |
<button class="btn btn--warning--outline btn--regular">Button</button> | |
<br> | |
<button class="btn btn--warning btn--medium">Button</button> | |
<button class="btn btn--warning--outline btn--medium">Button</button> | |
<br> | |
<button class="btn btn--warning btn--large">Button</button> | |
<button class="btn btn--warning--outline btn--large">Button</button> | |
<br><br> | |
<button class="btn btn--alert btn--small">Button</button> | |
<button class="btn btn--alert--outline btn--small">Button</button> | |
<br> | |
<button class="btn btn--alert btn--regular">Button</button> | |
<button class="btn btn--alert--outline btn--regular">Button</button> | |
<br> | |
<button class="btn btn--alert btn--medium">Button</button> | |
<button class="btn btn--alert--outline btn--medium">Button</button> | |
<br> | |
<button class="btn btn--alert btn--large">Button</button> | |
<button class="btn btn--alert--outline btn--large">Button</button> | |
<br><br> | |
<button class="btn--default--small">Button</button> | |
<button class="btn--default--small--outline">Button</button> | |
<br> | |
<button class="btn--default--regular">Button</button> | |
<button class="btn--default--regular--outline">Button</button> | |
<br> | |
<button class="btn--default--medium">Button</button> | |
<button class="btn--default--medium--outline">Button</button> | |
<br> | |
<button class="btn--default--large">Button</button> | |
<button class="btn--default--large--outline">Button</button> | |
<br><br> | |
<button class="btn--success--small">Button</button> | |
<button class="btn--success--small--outline">Button</button> | |
<br> | |
<button class="btn--success--regular">Button</button> | |
<button class="btn--success--regular--outline">Button</button> | |
<br> | |
<button class="btn--success--medium">Button</button> | |
<button class="btn--success--medium--outline">Button</button> | |
<br> | |
<button class="btn--success--large">Button</button> | |
<button class="btn--success--large--outline">Button</button> | |
<br><br> | |
<button class="btn--warning--small">Button</button> | |
<button class="btn--warning--small--outline">Button</button> | |
<br> | |
<button class="btn--warning--regular">Button</button> | |
<button class="btn--warning--regular--outline">Button</button> | |
<br> | |
<button class="btn--warning--medium">Button</button> | |
<button class="btn--warning--medium--outline">Button</button> | |
<br> | |
<button class="btn--warning--large">Button</button> | |
<button class="btn--warning--large--outline">Button</button> | |
<br><br> | |
<button class="btn--alert--small">Button</button> | |
<button class="btn--alert--small--outline">Button</button> | |
<br> | |
<button class="btn--alert--regular">Button</button> | |
<button class="btn--alert--regular--outline">Button</button> | |
<br> | |
<button class="btn--alert--medium">Button</button> | |
<button class="btn--alert--medium--outline">Button</button> | |
<br> | |
<button class="btn--alert--large">Button</button> | |
<button class="btn--alert--large--outline">Button</button> | |
<br><br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.3) | |
// Compass (v1.0.1) | |
// ---- | |
$base-font-size: 14px; | |
$base-line-height: 1.6; | |
$base-radius: 3px; | |
$button-radius: $base-radius; | |
$form-radius: $base-radius; | |
html { | |
box-sizing: border-box; | |
} | |
*, *:before, *:after { | |
box-sizing: inherit; | |
} | |
body { | |
font-family: DIN; | |
font-weight: regular; | |
font-size: $base-font-size; | |
line-height: $base-line-height; | |
} | |
button, input, optgroup, select, textarea { | |
margin: 0; | |
font: inherit; | |
color: inherit; | |
line-height: normal; | |
} | |
@function strip-unit($num) { | |
@return $num / ($num * 0 + 1); | |
} | |
@mixin rem($property, $values...) { | |
$max: length($values); | |
$pxValues: ''; | |
$remValues: ''; | |
@for $i from 1 through $max { | |
$value: strip-unit(nth($values, $i)); | |
$pxValues: #{$pxValues + $value*16}px; | |
@if $i < $max { | |
$pxValues: #{$pxValues + " "}; | |
} | |
} | |
@for $i from 1 through $max { | |
$value: strip-unit(nth($values, $i)); | |
$remValues: #{$remValues + $value}rem; | |
@if $i < $max { | |
$remValues: #{$remValues + " "}; | |
} | |
} | |
#{$property}: $pxValues; | |
#{$property}: $remValues; | |
} | |
// Multiple modifier | |
@mixin mm($modifier, $extend-modifier: false) { | |
@if $extend-modifier== true { | |
$len: str-length(#{&}); | |
$parent: str-slice(#{&}, 2, $len); | |
@at-root [class^="#{$parent}"][class*="--#{$modifier}"] { | |
@extend .#{$parent}; | |
@content; | |
} | |
} @else { | |
@at-root { | |
$selector: nth(&, 1); | |
$direct-parent: nth($selector, length($selector)); | |
#{$direct-parent}--#{$modifier} { @extend #{$direct-parent}; } | |
#{&}--#{$modifier} { @content; } | |
} | |
} | |
} | |
$UI_sizing_ratio: 1.2; | |
$UI_size: ( | |
tiny 1 / $UI_sizing_ratio / $UI_sizing_ratio, | |
small 1 / $UI_sizing_ratio, | |
regular 1, | |
medium 1 * $UI_sizing_ratio, | |
large 1 * $UI_sizing_ratio * $UI_sizing_ratio | |
); | |
$UI_state: ( | |
default #73C4F2, | |
warning #FFAA4A, | |
alert #F51F21, | |
success #00C55D | |
); | |
/*------------------------------------*\ | |
BUTTON - mixin | |
\*------------------------------------*/ | |
@mixin button ($colour) { | |
$colour-lightness: lightness($colour); | |
background: $colour; | |
border: 1px solid $colour; | |
&:hover { background: lighten($colour, 10 - (10 - $colour-lightness/10)); } | |
&:active { background: darken($colour, 10 - (10 - $colour-lightness/10)); } | |
@include mm('outline') { | |
//&[class*="--outline"] { | |
$colour-lightness: lightness($colour); | |
background: white; | |
color: $colour; | |
&:hover { background: lighten($colour, 95 - $colour-lightness); } | |
&:active { background: lighten($colour, 90 - $colour-lightness); } | |
} | |
} | |
/*------------------------------------*\ | |
BUTTON - style | |
\*------------------------------------*/ | |
.btn { | |
border-radius: $button-radius; | |
color: white; | |
cursor: pointer; | |
outline: 0; | |
@include mm('full-width') { | |
width: 100%; | |
} | |
@each $state in $UI_state { | |
@include mm(nth($state, 1)){ | |
$temp-value: nth($state, 2); | |
@include button($temp-value); | |
} | |
} | |
@each $size in $UI_size { | |
$temp-value: nth($size, 2); | |
@include mm(nth($size, 1)) { | |
@include rem(font-size, $temp-value); | |
@include rem(padding, $temp-value/4, $temp-value); | |
} | |
} | |
} | |
/*------------------------------------*\ | |
INPUT - mixin | |
\*------------------------------------*/ | |
@mixin input($colour) { | |
border-color: $colour; | |
color: $colour; | |
&:focus { border-color: $colour;} | |
} | |
/*------------------------------------*\ | |
INPUT - style | |
\*------------------------------------*/ | |
.input { | |
border-radius: $form-radius; | |
outline: 0; | |
border: 1px solid #eee; | |
&:focus { | |
border-color: #73C4F2; | |
} | |
@include mm('alert') { | |
border-color: #F51F21; | |
color: #F51F21; | |
&:focus { border-color: #F51F21;} | |
} | |
@each $state in $UI_state { | |
$temp-value: nth($state, 2); | |
@include mm(nth($state, 1)) { | |
@include input($temp-value); | |
} | |
} | |
@each $size in $UI_size { | |
$temp-value: nth($size, 2); | |
@include mm(nth($size, 1)) { | |
@include rem(font-size, $temp-value); | |
@include rem(padding, $temp-value/4, $temp-value/2); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
box-sizing: border-box; | |
} | |
*, *:before, *:after { | |
box-sizing: inherit; | |
} | |
body { | |
font-family: DIN; | |
font-weight: regular; | |
font-size: 14px; | |
line-height: 1.6; | |
} | |
button, input, optgroup, select, textarea { | |
margin: 0; | |
font: inherit; | |
color: inherit; | |
line-height: normal; | |
} | |
/*------------------------------------*\ | |
BUTTON - mixin | |
\*------------------------------------*/ | |
/*------------------------------------*\ | |
BUTTON - style | |
\*------------------------------------*/ | |
.btn, .btn--full-width, .btn--default, .btn--default--outline, .btn--warning, .btn--warning--outline, .btn--alert, .btn--alert--outline, .btn--success, .btn--success--outline, .btn--tiny, .btn--small, .btn--regular, .btn--medium, .btn--large { | |
border-radius: 3px; | |
color: white; | |
cursor: pointer; | |
outline: 0; | |
} | |
.btn--full-width { | |
width: 100%; | |
} | |
.btn--default, .btn--default--outline { | |
background: #73C4F2; | |
border: 1px solid #73C4F2; | |
} | |
.btn--default:hover, .btn--default--outline:hover { | |
background: #94d2f5; | |
} | |
.btn--default:active, .btn--default--outline:active { | |
background: #52b6ef; | |
} | |
.btn--default--outline { | |
background: white; | |
color: #73C4F2; | |
} | |
.btn--default--outline:hover { | |
background: #e8f5fd; | |
} | |
.btn--default--outline:active { | |
background: #d0ebfb; | |
} | |
.btn--warning, .btn--warning--outline { | |
background: #FFAA4A; | |
border: 1px solid #FFAA4A; | |
} | |
.btn--warning:hover, .btn--warning--outline:hover { | |
background: #ffb96b; | |
} | |
.btn--warning:active, .btn--warning--outline:active { | |
background: #ff9b29; | |
} | |
.btn--warning--outline { | |
background: white; | |
color: #FFAA4A; | |
} | |
.btn--warning--outline:hover { | |
background: #fff3e5; | |
} | |
.btn--warning--outline:active { | |
background: #ffe7cc; | |
} | |
.btn--alert, .btn--alert--outline { | |
background: #F51F21; | |
border: 1px solid #F51F21; | |
} | |
.btn--alert:hover, .btn--alert--outline:hover { | |
background: #f6393b; | |
} | |
.btn--alert:active, .btn--alert--outline:active { | |
background: #ee0b0d; | |
} | |
.btn--alert--outline { | |
background: white; | |
color: #F51F21; | |
} | |
.btn--alert--outline:hover { | |
background: #fee7e7; | |
} | |
.btn--alert--outline:active { | |
background: #fdcecf; | |
} | |
.btn--success, .btn--success--outline { | |
background: #00C55D; | |
border: 1px solid #00C55D; | |
} | |
.btn--success:hover, .btn--success--outline:hover { | |
background: #00d966; | |
} | |
.btn--success:active, .btn--success--outline:active { | |
background: #00b154; | |
} | |
.btn--success--outline { | |
background: white; | |
color: #00C55D; | |
} | |
.btn--success--outline:hover { | |
background: #e5fff2; | |
} | |
.btn--success--outline:active { | |
background: #ccffe4; | |
} | |
.btn--tiny { | |
font-size: 11.11111px; | |
font-size: 0.69444rem; | |
padding: 2.77778px 11.11111px; | |
padding: 0.17361rem 0.69444rem; | |
} | |
.btn--small { | |
font-size: 13.33333px; | |
font-size: 0.83333rem; | |
padding: 3.33333px 13.33333px; | |
padding: 0.20833rem 0.83333rem; | |
} | |
.btn--regular { | |
font-size: 16px; | |
font-size: 1rem; | |
padding: 4px 16px; | |
padding: 0.25rem 1rem; | |
} | |
.btn--medium { | |
font-size: 19.2px; | |
font-size: 1.2rem; | |
padding: 4.8px 19.2px; | |
padding: 0.3rem 1.2rem; | |
} | |
.btn--large { | |
font-size: 23.04px; | |
font-size: 1.44rem; | |
padding: 5.76px 23.04px; | |
padding: 0.36rem 1.44rem; | |
} | |
/*------------------------------------*\ | |
INPUT - mixin | |
\*------------------------------------*/ | |
/*------------------------------------*\ | |
INPUT - style | |
\*------------------------------------*/ | |
.input, .input--alert, .input--default, .input--warning, .input--success, .input--tiny, .input--small, .input--regular, .input--medium, .input--large { | |
border-radius: 3px; | |
outline: 0; | |
border: 1px solid #eee; | |
} | |
.input:focus, .input--alert:focus, .input--default:focus, .input--warning:focus, .input--success:focus, .input--tiny:focus, .input--small:focus, .input--regular:focus, .input--medium:focus, .input--large:focus { | |
border-color: #73C4F2; | |
} | |
.input--alert { | |
border-color: #F51F21; | |
color: #F51F21; | |
} | |
.input--alert:focus { | |
border-color: #F51F21; | |
} | |
.input--default { | |
border-color: #73C4F2; | |
color: #73C4F2; | |
} | |
.input--default:focus { | |
border-color: #73C4F2; | |
} | |
.input--warning { | |
border-color: #FFAA4A; | |
color: #FFAA4A; | |
} | |
.input--warning:focus { | |
border-color: #FFAA4A; | |
} | |
.input--alert { | |
border-color: #F51F21; | |
color: #F51F21; | |
} | |
.input--alert:focus { | |
border-color: #F51F21; | |
} | |
.input--success { | |
border-color: #00C55D; | |
color: #00C55D; | |
} | |
.input--success:focus { | |
border-color: #00C55D; | |
} | |
.input--tiny { | |
font-size: 11.11111px; | |
font-size: 0.69444rem; | |
padding: 2.77778px 5.55556px; | |
padding: 0.17361rem 0.34722rem; | |
} | |
.input--small { | |
font-size: 13.33333px; | |
font-size: 0.83333rem; | |
padding: 3.33333px 6.66667px; | |
padding: 0.20833rem 0.41667rem; | |
} | |
.input--regular { | |
font-size: 16px; | |
font-size: 1rem; | |
padding: 4px 8px; | |
padding: 0.25rem 0.5rem; | |
} | |
.input--medium { | |
font-size: 19.2px; | |
font-size: 1.2rem; | |
padding: 4.8px 9.6px; | |
padding: 0.3rem 0.6rem; | |
} | |
.input--large { | |
font-size: 23.04px; | |
font-size: 1.44rem; | |
padding: 5.76px 11.52px; | |
padding: 0.36rem 0.72rem; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<button class="btn btn--default btn--small">Button</button> | |
<button class="btn btn--default--outline btn--small">Button</button> | |
<br> | |
<button class="btn btn--default btn--regular">Button</button> | |
<button class="btn btn--default--outline btn--regular">Button</button> | |
<br> | |
<button class="btn btn--default btn--medium">Button</button> | |
<button class="btn btn--default--outline btn--medium">Button</button> | |
<br> | |
<button class="btn btn--default btn--large">Button</button> | |
<button class="btn btn--default--outline btn--large">Button</button> | |
<br><br> | |
<button class="btn btn--success btn--small">Button</button> | |
<button class="btn btn--success--outline btn--small">Button</button> | |
<br> | |
<button class="btn btn--success btn--regular">Button</button> | |
<button class="btn btn--success--outline btn--regular">Button</button> | |
<br> | |
<button class="btn btn--success btn--medium">Button</button> | |
<button class="btn btn--success--outline btn--medium">Button</button> | |
<br> | |
<button class="btn btn--success btn--large">Button</button> | |
<button class="btn btn--success--outline btn--large">Button</button> | |
<br><br> | |
<button class="btn btn--warning btn--small">Button</button> | |
<button class="btn btn--warning--outline btn--small">Button</button> | |
<br> | |
<button class="btn btn--warning btn--regular">Button</button> | |
<button class="btn btn--warning--outline btn--regular">Button</button> | |
<br> | |
<button class="btn btn--warning btn--medium">Button</button> | |
<button class="btn btn--warning--outline btn--medium">Button</button> | |
<br> | |
<button class="btn btn--warning btn--large">Button</button> | |
<button class="btn btn--warning--outline btn--large">Button</button> | |
<br><br> | |
<button class="btn btn--alert btn--small">Button</button> | |
<button class="btn btn--alert--outline btn--small">Button</button> | |
<br> | |
<button class="btn btn--alert btn--regular">Button</button> | |
<button class="btn btn--alert--outline btn--regular">Button</button> | |
<br> | |
<button class="btn btn--alert btn--medium">Button</button> | |
<button class="btn btn--alert--outline btn--medium">Button</button> | |
<br> | |
<button class="btn btn--alert btn--large">Button</button> | |
<button class="btn btn--alert--outline btn--large">Button</button> | |
<br><br> | |
<button class="btn--default--small">Button</button> | |
<button class="btn--default--small--outline">Button</button> | |
<br> | |
<button class="btn--default--regular">Button</button> | |
<button class="btn--default--regular--outline">Button</button> | |
<br> | |
<button class="btn--default--medium">Button</button> | |
<button class="btn--default--medium--outline">Button</button> | |
<br> | |
<button class="btn--default--large">Button</button> | |
<button class="btn--default--large--outline">Button</button> | |
<br><br> | |
<button class="btn--success--small">Button</button> | |
<button class="btn--success--small--outline">Button</button> | |
<br> | |
<button class="btn--success--regular">Button</button> | |
<button class="btn--success--regular--outline">Button</button> | |
<br> | |
<button class="btn--success--medium">Button</button> | |
<button class="btn--success--medium--outline">Button</button> | |
<br> | |
<button class="btn--success--large">Button</button> | |
<button class="btn--success--large--outline">Button</button> | |
<br><br> | |
<button class="btn--warning--small">Button</button> | |
<button class="btn--warning--small--outline">Button</button> | |
<br> | |
<button class="btn--warning--regular">Button</button> | |
<button class="btn--warning--regular--outline">Button</button> | |
<br> | |
<button class="btn--warning--medium">Button</button> | |
<button class="btn--warning--medium--outline">Button</button> | |
<br> | |
<button class="btn--warning--large">Button</button> | |
<button class="btn--warning--large--outline">Button</button> | |
<br><br> | |
<button class="btn--alert--small">Button</button> | |
<button class="btn--alert--small--outline">Button</button> | |
<br> | |
<button class="btn--alert--regular">Button</button> | |
<button class="btn--alert--regular--outline">Button</button> | |
<br> | |
<button class="btn--alert--medium">Button</button> | |
<button class="btn--alert--medium--outline">Button</button> | |
<br> | |
<button class="btn--alert--large">Button</button> | |
<button class="btn--alert--large--outline">Button</button> | |
<br><br> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment