34 lines
961 B
Stylus
34 lines
961 B
Stylus
|
// Additionnal "utility" breakpoints aliases
|
||
|
// ex. @include respond-to("medium-up") {...}
|
||
|
breakpoint(bp)
|
||
|
if bp == 'tiny'
|
||
|
return '(max-width: {tiny})'
|
||
|
else if bp == 'small'
|
||
|
return '(max-width: {small})'
|
||
|
else if bp == 'medium'
|
||
|
return '(max-width: {medium})'
|
||
|
else if bp == 'large'
|
||
|
return '(max-width: {large})'
|
||
|
else if bp == 'extra-large'
|
||
|
return '(max-width: {extra-large})'
|
||
|
else if bp == 'tiny-up'
|
||
|
return '(min-width: {tiny + 1})'
|
||
|
else if bp == 'small-up'
|
||
|
return '(min-width: {small + 1})'
|
||
|
else if bp == 'medium-up'
|
||
|
return '(min-width: {medium + 1})'
|
||
|
else if bp == 'large-up'
|
||
|
return '(min-width: {large + 1})'
|
||
|
else if bp == 'extra-large-up'
|
||
|
return '(min-width: {extra-large + 1})'
|
||
|
else if bp == 'retina'
|
||
|
return '(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi), (min-resolution: 2dppx)'
|
||
|
|
||
|
|
||
|
/*
|
||
|
respond-to(value)
|
||
|
string = breakpoint(value)
|
||
|
@media screen and {string}
|
||
|
{block}
|
||
|
*/
|