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
// Checking for Retina Devices | |
var query = "(-webkit-min-device-pixel-ratio: 1.5),\ | |
(min--moz-device-pixel-ratio: 1.5),\ | |
(-o-min-device-pixel-ratio: 3/2),\ | |
(min-device-pixel-ratio: 1.5),\ | |
(min-resolution: 144dpi),\ | |
(min-resolution: 1.5dppx)"; | |
if (window.devicePixelRatio > 1 || (window.matchMedia && window.matchMedia(query).matches)) { |
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 Units with PX fallback | |
// ------------------------------------------- | |
// example: @include rem("margin", 10, 5, 10, 5); | |
// example: @include rem("font-size", 14); | |
@mixin rem($property, $values...) { |
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
// ----------------------------------------- | |
// Linear Gradients | |
// ------------------------------------------- | |
// example: @include linearGradient(#cccccc, #333333); | |
@mixin linearGradient($top, $bottom){ | |
background: $top; /* Old browsers */ |
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
// ----------------------------------------- | |
// Retina Images | |
// ------------------------------------------- | |
// example: @include retina("logo2x.png", 100, 50); | |
@mixin retina($image, $width, $height) { | |
@media (min--moz-device-pixel-ratio: 1.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
// ----------------------------------------- | |
// Box Model | |
// ------------------------------------------- | |
@mixin box-sizing($box-model) { | |
-webkit-box-sizing: $box-model; | |
-moz-box-sizing: $box-model; | |
box-sizing: $box-model; |
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
// ----------------------------------------- | |
// Clearfix after element | |
// ------------------------------------------- | |
// usage: @include clearfix(); | |
@mixin clearfix() { | |
& { |
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
// ----------------------------------------- | |
// Translate | |
// ------------------------------------------- | |
// usage: @include translate(0); | |
@mixin translate($value){ | |
-webkit-transform: translatez($value); |
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
// ----------------------------------------- | |
// Transitions | |
// ------------------------------------------- | |
// example: @include single-transition(background, 1s, ease-in-out, 0); | |
@mixin single-transition($property, $duration, $timing-function, $delay) { | |
-webkit-transition: $property $duration $timing-function $delay; |
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
// ----------------------------------------- | |
// Hide Text | |
// ------------------------------------------- | |
// example: @include hide-text(); | |
@mixin hide-text() { | |
position:relative; |
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
// ----------------------------------------- | |
// Opacity | |
// ------------------------------------------- | |
// example: @include opacity(0.8); | |
@mixin opacity($opacity) { | |
opacity: $opacity; |
OlderNewer