Last active
August 29, 2015 13:56
-
-
Save yellowberri-snippets/9191368 to your computer and use it in GitHub Desktop.
SASS: Inner Column & Breakpoint Setup
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
$mobileColumn: 400; | |
$narrowColumn: 700; | |
$multiColumn: 1000; | |
$mainWidth: $narrowColumn - 40; | |
$multiWidth: $multiColumn - 40; | |
$narrowWidth: 95%; | |
$mobileWidth: 90%; | |
@mixin breakpoint($point) { | |
@if $point == mobile { | |
@media screen and (max-width: $mobileColumn * 1px) { @content } | |
} | |
@if $point == narrowColumn { | |
@media screen and (max-width: $narrowColumn * 1px) { @content } | |
} | |
@if $point == multiColumn { | |
@media screen and (min-width: $multiColumn * 1px){ @content } | |
} | |
} | |
.inner-col { | |
position: relative; | |
margin: 0 auto; | |
width: $mainWidth * 1px; | |
@include breakpoint(multiColumn) { | |
width: $multiWidth * 1px; | |
} | |
@include breakpoint(narrowColumn) { | |
width: $narrowWidth; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment