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
$contrasted-default-dark: #000; | |
$contrasted-default-light: #fff; | |
@mixin contrasted($bg, $dark:$contrasted-default-dark, $light:$contrasted-default-light){ | |
background-color: $bg; | |
color: get_contrast_yiq($bg, $dark, $light); | |
} |
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.2.5 | |
@function gcd($n,$d) { | |
$numerator: if($n < $d,$d,$n); | |
$denominator: if($n < $d,$n,$d); | |
$remainder: $numerator; | |
$last_remainder: $numerator; | |
@while $remainder != 0 { | |
$last_remainder: $remainder; | |
$remainder: $denominator % $numerator; |
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
require 'sass' | |
require 'husler' | |
module Sass::Script::Functions | |
module Husl | |
def husl_to_rgb(h, s, l) # assume h (0-360) s, l (0-100) | |
h = h.to_f | |
Husler.husl_to_rgb(h,s,l) | |
end |
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
Show hidden characters
{ | |
"folders": | |
[ | |
{ | |
"path": "Leanpub/sublime-productivity", | |
"folder_exclude_patterns": ["epub_images", "convert_html", "preview", "published"], | |
"file_exclude_patterns": [".gitignore", "*.sublime*", "*Icon*"] | |
}, | |
{ | |
"path": "SublimeTextTips" |
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
=position($type, $params...) | |
position: #{$type} | |
@each $param in $params | |
#{nth($param,1)}: #{nth($param,2)} | |
.test | |
+position(absolute, bottom 0px, top 0px) |
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
=position($type, $params...) | |
position: #{$type} | |
@each $param in $params | |
#{nth($param,1)}: #{nth($param,2)} | |
.test | |
+position(absolute, bottom 0px, top 0px) |
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
//========== REM dimensions, pixel fallback | |
$base-font-size: 10px !default | |
=rem($prop, $rems...) | |
@if type-of($prop) == 'list' and nth($prop,1) == position |
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
// SCRATCH | |
// typo source definitions | |
@font-face {} | |
$base-family: Helvetica; | |
$heading-family: Georgia; | |
// basic typo sizing | |
$base-font-size: 16px !default; |
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
// HTML5 section-heading outline style generation | |
// not actually the right way of dealing with doc outline but just a test | |
$heading-font-sizes: 12px 14px 16px 20px 24px 30px; | |
$s: h1; | |
@for $n from 0 through 5 { | |
#{$s} { font-size: nth($heading-font-sizes, length($heading-font-sizes) - $n); } | |
$s: append((section), $s); | |
} |
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
// hack of map/hash functionality, works best with SCSS syntax | |
// works with list of tuples; can accept key-value in either order. | |
@function value($map, $key) { | |
@each $pair in $map { | |
$i: index($pair, $key); | |
@if $i { | |
@return nth($pair, 3 - $i); | |
} | |
} |
OlderNewer