Skip to content

Instantly share code, notes, and snippets.

@npofopr
Created January 15, 2017 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save npofopr/a2dd57e80ab9eb8b081c9b1f237b725b to your computer and use it in GitHub Desktop.
Save npofopr/a2dd57e80ab9eb8b081c9b1f237b725b to your computer and use it in GitHub Desktop.
clearfix, responsive images, breakpoints
// 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