Skip to content

Instantly share code, notes, and snippets.

View richthegeek's full-sized avatar

Richard Lyon richthegeek

View GitHub Profile
@richthegeek
richthegeek / _ios-checkbox.scss
Created January 26, 2012 14:54
iOS checkboxes
@mixin linear-gradient($a, $b: false, $c: false, $d: false, $e: false, $f: false, $g: false) {
$value: $a;
@each $var in $b, $c, $d, $e, $f, $g {
@if $var {
$value: $value + ', ' + $var;
}
}
$value: unquote($value);
@include value-prefix('background', "linear-gradient(" + $value + ")");
}
.treeview {
& > ul > li:first-of-type {
& > span {
padding-left: 12px !important;
}
&::before {
content: '';
position: absolute;
width: 10px;
@richthegeek
richthegeek / _tooltip.scss
Created January 25, 2012 09:56
Cheap and easy tooltips :)
@mixin tooltip($text, $top: 0px, $left: 0px) {
&:hover::after {
$top: $top - 7px;
$left: $left - 10px;
content: quote($text);
position: absolute;
@include transition(all, 0.3s);
@include linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.8), transparent);
border-radius: 20px;