Created
March 17, 2016 15:07
-
-
Save maniqui/917a6d4a16aac8b88a8e to your computer and use it in GitHub Desktop.
A simple SCSS snippet for debugging Bootstrap breakpoints.
This file contains hidden or 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
body { | |
&::before { | |
@include pseudo($content: "xs"); | |
@include position(fixed, $bottom: 0, $right: 0, $z-index: $zindex-modal); | |
@include size(40px); | |
line-height: 40px; | |
text-align: center; | |
background-color: #000; | |
color: #fff; | |
font-size: 2rem; | |
border: 1px solid #fff; | |
border-width: 1px 0 0 1px; | |
@include media-breakpoint-up(sm) { | |
content: "sm"; | |
} | |
@include media-breakpoint-up(md) { | |
content: "md"; | |
} | |
@include media-breakpoint-up(lg) { | |
content: "lg"; | |
} | |
@include media-breakpoint-up(xl) { | |
content: "xl"; | |
} | |
} | |
} | |
// Positioning mixin | |
@mixin position($position: absolute, $top: null, $right: null, $bottom: null, $left: null, $z-index: null) { | |
@if $position != null { | |
position: $position; | |
} | |
@if $top != null { | |
top: $top; | |
} | |
@if $right != null { | |
right: $right; | |
} | |
@if $bottom != null { | |
bottom: $bottom; | |
} | |
@if $left != null { | |
left: $left; | |
} | |
@if $z-index != null { | |
z-index: $z-index; | |
} | |
} | |
// Add basic declarations for creating pseudo-elements | |
@mixin pseudo($content: "", $display: block) { | |
content: $content; | |
display: $display; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment