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
// ========================================================== | |
// Unit Conversion | |
// ========================================================== | |
// | |
// Functions: | |
// ---------------------------------------------------------- | |
// | |
// NUMBER: | |
// | |
// isNaN($value) - returns true or false if type-of($value)==number |
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
// ---------------------------------------- | |
// emulate include-context | |
// ---------------------------------------- | |
$include-context-list: (); | |
@mixin include-context($name){ | |
$include-context-list: append($include-context-list, $name, comma) !global; | |
@content; | |
$include-context-list: nth-remove($include-context-list, -1) !global; | |
} | |
@function include-context(){ |
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
// ---------------------------------------- | |
// emulate mixin-context | |
// ---------------------------------------- | |
$mixin-context-list: (); | |
@mixin mixin-context($name){ | |
$mixin-context-list: append($mixin-context-list, $name, comma) !global; | |
@content; | |
$mixin-context-list: nth-remove($mixin-context-list, -1) !global; | |
} | |
@function mixin-context(){ |
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
// ---------------------------------------- | |
$trace-list: (); | |
@mixin trace($name){ | |
$trace-list: append($trace-list, $name, comma) !global; | |
@content; | |
$trace-list: nth-remove($trace-list, -1) !global; | |
} | |
@function nth-remove($list, $n){ | |
$r: ();$n: if($n < 0, length($list) + $n + 1, $n); $b: is-bracketed($list); $s: list-separator($list); | |
@for $i from 1 through length($list){ @if $i != $n { $r: append($r, nth($list, $i)); }} |
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
// ---------------------------------------- | |
$trace-list: (); | |
@mixin trace($name){ | |
$trace-list: append($trace-list, $name, comma) !global; | |
@content; | |
$trace-list: nth-remove($trace-list, -1) !global; | |
} | |
@function nth-remove($list, $n){ | |
$r: ();$n: if($n < 0, length($list) + $n + 1, $n); $b: is-bracketed($list); $s: list-separator($list); | |
@for $i from 1 through length($list){ @if $i != $n { $r: append($r, nth($list, $i)); }} |
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
$once: (); | |
@mixin once($key){ | |
@if not index($once, $key){ | |
$once: append($once, $key) !global; | |
@content; | |
} | |
} |
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
// is object fit supported | |
if (document.body.style.objectFit === undefined) { | |
// loop through all images | |
[].slice | |
.call(document.querySelectorAll('img')) | |
.map(img => { | |
// image has background-size cover or contain |
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
// –––––––––––––––––––––––––––––––––––––––––––––––––– | |
// frankly | |
// | |
// font-smoothing | |
// font-size | |
// | |
// –––––––––––––––––––––––––––––––––––––––––––––––––– | |
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.1) | |
// Compass (v1.0.1) | |
// ---- | |
// =============================================================================================== | |
// Shorthands | |
// =============================================================================================== | |
// Absolute length | |
@function px($val) { @return convert-to-length($val, px); } |
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
=========================== | |
str-replace | |
str-to-map | |
TODO - Add mqs to lists | |
=========================== |
NewerOlder