// Table of Contents // ================================================== // Helper Functions // Attribute Functions // Attribute Mixins // Vendor Mixins // Helper Funtions // ================================================== @function dasherize($selector, $key) { @if $key { @return #{$selector}-#{$key}; } @else { @return #{$selector}; } } @function text-color-on($color) { @if index($colors-black-text, $color) { @return color(black); } @else { @return color(white); } } // Attribute Funtions // ================================================== @function background-hover-color($color) { @return darken(color($color), 1.75%); } @function border-radius($size) { @return map-get($common-border-radiuses, $size); } @function darkest-color($color) { @return darken(color($color), 12.5%); } @function darksome-color($color) { @return darken(color($color), 10%); } @function dark-color($color) { @return darken(color($color), 7.5%); } @function darker-color($color) { @return darken(color($color), 5%); } @function darkish-color($color) { @return darken(color($color), 2.5%); } @function color($color) { @return map-get($colors, $color); } @function lightish-color($color) { @return lighten(color($color), 2.5%); } @function lighter-color($color) { @return lighten(color($color), 5%); } @function light-color($color) { @return lighten(color($color), 7.5%); } @function lightsome-color($color) { @return lighten(color($color), 10%); } @function lightest-color($color) { @return lighten(color($color), 12.5%); } @function progress-size($size) { @return map-get($progress-sizes, $size); } @function text-family($family) { @return map-get($font-families, $family); } @function text-line-height($line-height) { @return map-get($font-line-heights, $line-height); } @function text-size($size) { @return map-get($font-sizes, $size); } @function text-space($space) { @return map-get($font-spaces, $space); } @function text-weight($weight) { @return map-get($font-weights, $weight); } // Vendor Mixins // ================================================== @mixin animation($animation...) { -webkit-animation: $animation; -ms-animation: $animation; animation: $animation; } @mixin animation-delay($delay) { -webkit-animation-delay: $delay; -ms-animation-delay: $delay; animation-delay: $delay; } @mixin animation-duration($duration) { -webkit-animation-duration: $duration; -ms-animation-duration: $duration; animation-duration: $duration; } @mixin animation-fill-mode($mode) { -webkit-animation-fill-mode: $mode; -ms-animation-fill-mode: $mode; animation-fill-mode: $mode; } @mixin animation-iteration-count($iteration-count) { -webkit-animation-iteration-count: $iteration-count; -ms-animation-iteration-count: $iteration-count; animation-iteration-count: $iteration-count; } @mixin animation-name($name) { -webkit-animation-name: $name; -ms-animation-name: $name; animation-name: $name; } @mixin animation-timing-function($function) { -webkit-animation-timing-function: $function; -ms-animation-timing-function: $function; animation-timing-function: $function; } @mixin appearance($appearance) { -webkit-appearance: $appearance; -ms-appearance: $appearance; appearance: $appearance; } @mixin backface-visibility ($visibility) { -webkit-backface-visibility: $visibility; -ms-backface-visibility: $visibility; backface-visibility: $visibility; } @mixin background-image($background-image...) { background-image: -webkit-linear-gradient($background-image); background-image: -ms-linear-gradient($background-image); background-image: linear-gradient($background-image); } @mixin background-size($size) { -webkit-background-size: $size; -ms-background-size: $size; background-size: $size; } @mixin overflow-scrolling($scroll) { -webkit-overflow-scrolling: $scroll; -ms-overflow-scrolling: $scroll; overflow-scrolling: $scroll; } @mixin tap-highlight-color($color) { -webkit-tap-highlight-color: $color; -ms-tap-highlight-color: $color; tap-highlight-color: $color; } @mixin text-size-adjust($size) { -webkit-text-size-adjust: $size; -ms-text-size-adjust: $size; text-size-adjust: $size; } @mixin text-decoration-skip($object) { -webkit-text-decoration-skip: $object; -ms-text-decoration-skip: $object; text-decoration-skip: $object; } @mixin transform($transform) { -webkit-transform: $transform; -ms-transform: $transform; transform: $transform; } @mixin transform-origin($origin) { -webkit-transform-origin: $origin; -ms-transform-origin: $origin; transform-origin: $origin; } @mixin transition($transition) { -webkit-transition: $transition; -ms-transition: $transition; transition: $transition; } @mixin user-select($select) { -webkit-user-select: $select; -ms-user-select: $select; user-select: $select; }