//Fonts @mixin heading-font-light { font-family: 'Titillium Web', sans-serif; font-weight: 300; } @mixin font-razeItalic { font-family: 'Rage'; } // Transition @mixin transition($property...) { -webkit-transition: $property; -moz-transition: $property; -ms-transition: $property; -o-transition: $property; transition: $property; } @mixin transition-delay($delay...) { -moz-transition-delay: $delay; -o-transition-delay: $delay; -webkit-transition-delay: $delay; transition-delay: $delay; } // -------------------------------------------------- // Flexbox SASS mixins // -------------------------------------------------- // Flexbox display @mixin flexbox() { display: -webkit-box; display: -moz-box; display: -ms-flexbox; display: -webkit-flex; display: flex; } // The 'flex' shorthand // - applies to: flex items // , initial, auto, or none @mixin flex($values) { -webkit-box-flex: $values; -moz-box-flex: $values; -webkit-flex: $values; -ms-flex: $values; flex: $values; } // Flex Flow Direction // - applies to: flex containers // row | row-reverse | column | column-reverse @mixin flex-direction($direction) { -webkit-flex-direction: $direction; -moz-flex-direction: $direction; -ms-flex-direction: $direction; flex-direction: $direction; } // Flex Line Wrapping // - applies to: flex containers // nowrap | wrap | wrap-reverse @mixin flex-wrap($wrap) { -webkit-flex-wrap: $wrap; -moz-flex-wrap: $wrap; -ms-flex-wrap: $wrap; flex-wrap: $wrap; } // Flex Direction and Wrap // - applies to: flex containers // || @mixin flex-flow($flow) { -webkit-flex-flow: $flow; -moz-flex-flow: $flow; -ms-flex-flow: $flow; flex-flow: $flow; } // Display Order // - applies to: flex items // @mixin order($val) { -webkit-box-ordinal-group: $val; -moz-box-ordinal-group: $val; -ms-flex-order: $val; -webkit-order: $val; order: $val; } // Flex grow factor // - applies to: flex items // @mixin flex-grow($grow) { -webkit-flex-grow: $grow; -moz-flex-grow: $grow; -ms-flex-grow: $grow; flex-grow: $grow; } // Flex shrink // - applies to: flex item shrink factor // @mixin flex-shrink($shrink) { -webkit-flex-shrink: $shrink; -moz-flex-shrink: $shrink; -ms-flex-shrink: $shrink; flex-shrink: $shrink; } // Flex basis // - the initial main size of the flex item // - applies to: flex itemsnitial main size of the flex item // @mixin flex-basis($width) { -webkit-flex-basis: $width; -moz-flex-basis: $width; -ms-flex-basis: $width; flex-basis: $width; } // Axis Alignment // - applies to: flex containers // flex-start | flex-end | center | space-between | space-around @mixin justify-content($justify) { -webkit-justify-content: $justify; -moz-justify-content: $justify; -ms-justify-content: $justify; justify-content: $justify; -ms-flex-pack: $justify; } // Packing Flex Lines // - applies to: multi-line flex containers // flex-start | flex-end | center | space-between | space-around | stretch @mixin align-content($align) { -webkit-align-content: $align; -moz-align-content: $align; -ms-align-content: $align; align-content: $align; } // Cross-axis Alignment // - applies to: flex containers // flex-start | flex-end | center | baseline | stretch @mixin align-items($align) { -webkit-align-items: $align; -moz-align-items: $align; -ms-align-items: $align; align-items: $align; } // Cross-axis Alignment // - applies to: flex items // auto | flex-start | flex-end | center | baseline | stretch @mixin align-self($align) { -webkit-align-self: $align; -moz-align-self: $align; -ms-align-self: $align; align-self: $align; } // Browser Prefixes @mixin transform($transforms) { -webkit-transform: $transforms; -moz-transform: $transforms; -ms-transform: $transforms; transform: $transforms; } // Rotate @mixin rotate ($deg) { @include transform(rotate(#{$deg}deg)); } // Scale @mixin scale($scale) { @include transform(scale($scale)); } // Translate @mixin translate ($x, $y) { @include transform(translate($x, $y)); } @mixin translateX ($x) { @include transform(translateX($x)); } @mixin translateY ($y) { @include transform(translateY($y)); } // Skew @mixin skew ($x, $y) { @include transform(skew(#{$x}deg, #{$y}deg)); } // Transform Origin @mixin transform-origin ($origin) { -webkit-transform-origin: $origin; -moz-transform-origin: $origin; -ms-transform-origin: $origin; transform-origin: $origin; } // box-shadow @mixin box-shadow($property) { box-shadow: $property; -webkit-box-shadow: $property; -moz-box-shadow: $property; } //border radius @mixin border-radius($radius) { border-radius: $radius; -webkit-border-radius: $radius; -moz-border-radius: $radius; } //gradient @mixin gradient($color1, $color2) { background-color: $color1; filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#{$color1}, endColorstr=#{$color2}); background-image: -moz-linear-gradient(center top, $color1, $color2); background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($color1), to($color2)); } %flex-center { @include flexbox(); @include justify-content(center); @include align-items(center); height: 100%; } // mixins for mobile responsiveness @mixin screen($res-min, $res-max) { @media screen and (min-width: $res-min) and (max-width: $res-max) { @content; } } @mixin max-screen($res) { @media screen and (max-width: $res) { @content; } } @mixin min-screen($res) { @media screen and (min-width: $res) { @content; } }