Created
January 15, 2017 16:08
-
-
Save npofopr/a2dd57e80ab9eb8b081c9b1f237b725b to your computer and use it in GitHub Desktop.
clearfix, responsive images, breakpoints
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
// Mixins. | |
m-nl() | |
margin 0 | |
padding 0 | |
text-indent 0 | |
list-style none | |
list-style-position outside | |
m-cf() | |
&:before, &:after | |
display table | |
content "" | |
&:after | |
clear both | |
.lt-ie8 & | |
zoom 1 | |
m-blocks-justify() | |
text-align justify | |
text-justify newspaper | |
m-img-fluid() | |
display: block | |
max-width: 100% | |
height: auto | |
media_queries = { | |
phone_only : "(max-width: 599px)", | |
tablet_portrait_up : "(min-width: 600px)", | |
tablet_landscape_up : "(min-width: 900px)", | |
desktop_up : "(min-width: 1200px)", | |
big_desktop_up : "(min-width: 1800px)" | |
} | |
for_media(breakpoints) | |
conditions = () | |
for breakpoint in breakpoints | |
push(conditions, media_queries[breakpoint]) | |
conditions = join(", ", conditions) | |
@media conditions | |
{block} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment