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
// ---- | |
// libsass (v0.7.0) | |
// ---- | |
@import "sass-list-maps"; | |
@function single($unit) { | |
$units: 'em', 'ex', 'ch', 'rem', '%', 'vw', 'vh', 'vmin', 'vmax', 'cm', 'mm', 'in', 'px', 'pt', 'pc', 'deg', 'grad', 'rad', 'turn', 's', 'ms', 'dpi', 'dpcm', 'dppx'; | |
$singles: 1em, 1ex, 1ch, 1rem, 1%, 1vw, 1vh, 1vmin, 1vmax, 1cm, 1mm, 1in, 1px, 1pt, 1pc, 1deg, 1grad, 1rad, 1turn, 1s, 1ms, 1dpi, 1dpcm, 1dppx; | |
$index: index($units, $unit); @if $index { @return nth($singles, $index); } @return 1; } |
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
// ---- | |
// libsass (v0.7.0) | |
// ---- | |
@function single($unit) { | |
$units: 'em', 'ex', 'ch', 'rem', '%', 'vw', 'vh', 'vmin', 'vmax', 'cm', 'mm', 'in', 'px', 'pt', 'pc', 'deg', 'grad', 'rad', 'turn', 's', 'ms', 'dpi', 'dpcm', 'dppx'; | |
$singles: 1em, 1ex, 1ch, 1rem, 1%, 1vw, 1vh, 1vmin, 1vmax, 1cm, 1mm, 1in, 1px, 1pt, 1pc, 1deg, 1grad, 1rad, 1turn, 1s, 1ms, 1dpi, 1dpcm, 1dppx; | |
$index: index($units, $unit); @if $index { @return nth($singles, $index); } @return 1; } | |
@function strip($value) { @return $value / single(unit($value)); } | |
@function assert($value, $unit) { @return strip($value) * single($unit); } |
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
// ---- | |
// libsass (v0.7.0) | |
// ---- | |
@import "sass-list-maps"; | |
@mixin col-size($span, $offsets...) { | |
$n: nth($span, 1); $d: nth($span, 2); | |
width: $n / $d * 100%; | |
@each $offset in $offsets { |
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
// ---- | |
// libsass (v0.7.0) | |
// ---- | |
@mixin col-size($span, $offsets...) { | |
$n: nth($span, 1); $d: nth($span, 2); | |
width: $n / $d * 100%; | |
@each $offset in $offsets { | |
$dir: nth($offset, 1); $o: nth($offset, 2); | |
@if length($offset) > 2 { $d: nth($offset, 3); } |
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.3.4) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
$in-query: false; | |
@mixin mq($mq-string) { | |
$in-query: true; | |
@media #{$mq-string} { |
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
// ---- | |
// libsass (v0.7.0) | |
// ---- | |
/* | |
what we want | |
tscale function | |
interp function | |
new calcs of compensated typographic margins | |
- natural-line-height vs compensated-line-height subtractions |
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
// ---- | |
// libsass (v0.7.0) | |
// ---- | |
@import "sass-list-maps"; | |
/* | |
SASS-LIST-MAPS | |
a development sketch - more info at https://github.com/lunelson/sass-list-maps |
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
// ---- | |
// libsass (v0.7.0) | |
// ---- | |
@import "sass-list-maps"; | |
$sizes: ( | |
'h4-sm' ( | |
'fz' 0.9rem, | |
'tt' -0.1em, |
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
// ---- | |
// libsass (v0.7.0) | |
// ---- | |
/* | |
Libsass bug: splat arguments | |
it seems you can't pass splat list arguments | |
to aliased functions under certain conditions | |
*/ |
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
// media query mixin which tracks in/out status | |
$query: false; | |
@mixin mq($mq-string) { | |
$query: true; | |
@media #{$mq-string} { @content; } | |
$query: false; | |
} | |
// conditional mixin | |
@mixin inline-block($output: false) { |