Skip to content

Commit

Permalink
Modify utility grid classes to be mobile first responsive
Browse files Browse the repository at this point in the history
Also added minor utility functions.
  • Loading branch information
acahir committed Jan 26, 2019
1 parent 7462765 commit 2c617ee
Showing 1 changed file with 27 additions and 17 deletions.
44 changes: 27 additions & 17 deletions css/barebones.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,32 +134,38 @@ html {
grid-template-columns: minmax(200px, 1fr);
}

/* basic grids */
.grid-container.fifths {
grid-template-columns: repeat(5, 1fr);
}
.grid-container.quarters {
grid-template-columns: repeat(4, 1fr);
}
.grid-container.thirds {
grid-template-columns: repeat(3, 1fr);
}
.grid-container.halves {
grid-template-columns: repeat(2, 1fr);
}
.grid-container.full {
grid-template-columns: 1fr;
}

/* grids to 3 columns above mobile sizes */
@media (min-width: 600px) {
.grid-container {
grid-template-columns: repeat(3, 1fr);
padding: 10px 0;
}

/* basic grids */
.grid-container.fifths {
grid-template-columns: repeat(5, 1fr);
}
.grid-container.quarters {
grid-template-columns: repeat(4, 1fr);
}
.grid-container.thirds {
grid-template-columns: repeat(3, 1fr);
}
.grid-container.halves {
grid-template-columns: repeat(2, 1fr);
}
.grid-container.full {
grid-template-columns: 1fr;
}

}







/* Base Styles
–––––––––––––––––––––––––––––––––––––––––––––––––– */
html {
Expand Down Expand Up @@ -417,6 +423,10 @@ form {
float: right; }
.u-pull-left {
float: left; }
.u-align-left {
text-align: left; }
.u-align-right {
text-align: right; }


/* Misc
Expand Down

0 comments on commit 2c617ee

Please sign in to comment.