Skip to content

Instantly share code, notes, and snippets.

@johanguse
Created November 18, 2018 19:46
Show Gist options
  • Save johanguse/16ff4ddbf8a5d6c3f6b5073e42f7c2e4 to your computer and use it in GitHub Desktop.
Save johanguse/16ff4ddbf8a5d6c3f6b5073e42f7c2e4 to your computer and use it in GitHub Desktop.
Simple SASS Grid - webdesign.tutsplus.com/pt/tutorials/a-simple-responsive-grid-made-even-better-with-sass--cms-21540
@import "variables";
@import "mixins";
*, *:after, *:before {
margin: 0;
padding: 0;
@include border-box;
}
img {
width: auto;
max-width: 100%;
height: auto !important;
}
.wrapper {
width: 100%;
margin: 0 auto;
}
.wrapper, .row {
@extend %clearfix;
}
[class*='column-'] {
float: left;
padding: 1em;
width: 100%;
min-height: 1px;
}
@media #{$breakpoint-medium} {
.wrapper {
width: 95%;
max-width: $grid-max-width;
}
@for $i from 1 through $grid-columns {
.column-#{$i} {
width: 100% / $grid-columns * $i;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment