Skip to content

Instantly share code, notes, and snippets.

@okjodom
Last active August 29, 2017 05:59
Show Gist options
  • Select an option

  • Save okjodom/a61cd525ef40ec0e62005cc36ec18056 to your computer and use it in GitHub Desktop.

Select an option

Save okjodom/a61cd525ef40ec0e62005cc36ec18056 to your computer and use it in GitHub Desktop.
experimental breakpoints
// breakpoints
@mixin desktop_up{
// includes very large screens
@media (min-width: 768px){
@content;
}
}
@mixin desktop{
@media (min-width: 768px) and (max-width: 1024px){
@content;
}
}
@mixin desktop_down{
@media (max-width: 1024px){
@content;
}
}
@mixin tablet_up{
@media (min-width: 425px){
@content;
}
}
@mixin tablet{
@media (min-width: 425px) and (max-width: 768px){
@content;
}
}
@mixin tablet_down{
@media (max-width: 768px){
@content;
}
}
@mixin large_phone_up{
@media (min-width: 375px){
@content;
}
}
@mixin large_phone{
@media (min-width: 375px) and (max-width: 425px){
@content;
}
}
@mixin large_phone_down{
@media (max-width: 425px){
@content;
}
}
@mixin medium_phone_up{
@media (min-width: 320px){
@content;
}
}
@mixin medium_phone{
@media (min-width: 320px) and (max-width: 375px){
@content;
}
}
@mixin medium_phone_down{
@media (max-width: 375px){
@content;
}
}
@mixin small_phone{
@media (max-width: 320px){
@content;
}
}
//usage --->
.myDiv{
height: 80%;
width: 100%;
@include medium_phone_up{
height: 60%;
width: 80%;
align-self: center;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment