5 changed files with 53 additions and 38 deletions
@ -1,29 +1,44 @@
@@ -1,29 +1,44 @@
|
||||
|
||||
@mixin breakpt($pt) { |
||||
@media (max-width: $pt) { |
||||
@content; |
||||
} |
||||
// not handled by autoprefixer |
||||
@mixin tap-highlight-color($color) { |
||||
-webkit-tap-highlight-color: $color; |
||||
} |
||||
|
||||
@mixin breakpt-height($pt) { |
||||
@media (max-height: $pt) { |
||||
@content; |
||||
} |
||||
} |
||||
/* Supports media type and up to two expressions |
||||
|
||||
ex output: |
||||
@media only screen and (min-width: 700px) and (max-width: 1280px) { |
||||
.bar .middle img { |
||||
display: none; |
||||
} |
||||
} |
||||
|
||||
@mixin breakpt-only-screen($pt) { |
||||
@media only screen and (max-width: $pt) { |
||||
@content; |
||||
@param $media-value1: required - number/units |
||||
@param $media-feature1: optional - width,height,ect... |
||||
@param $media-type: optional - screen,print,ect... |
||||
@param $media-value2: optional - number/units |
||||
@param $media-feature2: optional - width,height,ect... |
||||
*/ |
||||
@mixin breakpt($media-value1, $media-feature1: max-width, $media-type: null, |
||||
$media-value2: null, $media-feature2: max-width) { |
||||
@if($media-type and $media-value2) { |
||||
@media #{$media-type} and ($media-feature1: $media-value1) and ($media-feature2: $media-value2) { |
||||
@content; |
||||
} |
||||
} |
||||
} |
||||
|
||||
@mixin breakpt-only-screen-with-min($pt1, $pt2) { |
||||
@media only screen and (min-width: $pt1) and (max-width: $pt2) { |
||||
@content; |
||||
@if(not $media-type and $media-value2) { |
||||
@media ($media-feature1: $media-value1) and ($media-feature2: $media-value2) { |
||||
@content; |
||||
} |
||||
} |
||||
@if($media-type and not $media-value2) { |
||||
@media #{$media-type} and ($media-feature1: $media-value1) { |
||||
@content; |
||||
} |
||||
} |
||||
@if(not $media-type and not $media-value2) { |
||||
@media ($media-feature1: $media-value1) { |
||||
@content; |
||||
} |
||||
} |
||||
} |
||||
|
||||
// not handled by autoprefixer |
||||
@mixin tap-highlight-color($color) { |
||||
-webkit-tap-highlight-color: $color; |
||||
} |
||||
|
||||
Loading…
Reference in new issue