Skip to content

Instantly share code, notes, and snippets.

@monners
Created December 8, 2016 05:14
Show Gist options
  • Save monners/4b2a4e7781051106eb9784f234400fc6 to your computer and use it in GitHub Desktop.
Save monners/4b2a4e7781051106eb9784f234400fc6 to your computer and use it in GitHub Desktop.
// Disabling the linter on this for now.
// scss-lint:disable SelectorFormat
// NOTE: Inactive to avoid potential conflicts - We might use this later in the Consumer project rebuild
// .container-fluid,
// .container {
// margin-right: auto;
// margin-left: auto;
// }
//
// .container-fluid {
// padding-right: $m-grid-padding-right;
// padding-left: $m-grid-padding-left;
// }
.row {
box-sizing: border-box;
display: flex;
flex: 0 1 auto;
flex-direction: row;
flex-wrap: wrap;
margin-right: -($m-grid-padding-right / 2);
margin-left: -($m-grid-padding-left / 2);
}
.row.grid-reverse {
flex-direction: row-reverse;
}
// columns should default to 100% width below minimum speficied breakpoint
[class*=" col-"],
[class^="col-"],
.col {
box-sizing: border-box;
flex-basis: 100%;
max-width: 100%;
padding-right: ($m-grid-padding-right / 2);
padding-left: ($m-grid-padding-left / 2);
}
.col-1,
.col-2,
.col-3,
.col-4,
.col-5,
.col-6,
.col-7,
.col-8,
.col-9,
.col-10,
.col-11,
.col-12,
.col-offset-0,
.col-offset-1,
.col-offset-2,
.col-offset-3,
.col-offset-4,
.col-offset-5,
.col-offset-6,
.col-offset-7,
.col-offset-8,
.col-offset-9,
.col-offset-10,
.col-offset-11,
.col-offset-12 {
flex: 0 0 auto;
padding-right: $m-grid-padding-right / 2;
padding-left: $m-grid-padding-left / 2;
}
.col {
flex-grow: 1;
flex-basis: 0;
max-width: 100%;
}
.col-1 {
flex-basis: 8.333%;
max-width: 8.333%;
}
.col-2 {
flex-basis: 16.666%;
max-width: 16.666%;
}
.col-3 {
flex-basis: 25%;
max-width: 25%;
}
.col-4 {
flex-basis: 33.333%;
max-width: 33.333%;
}
.col-5 {
flex-basis: 41.667%;
max-width: 41.667%;
}
.col-6 {
flex-basis: 50%;
max-width: 50%;
}
.col-7 {
flex-basis: 58.333%;
max-width: 58.333%;
}
.col-8 {
flex-basis: 66.667%;
max-width: 66.667%;
}
.col-9 {
flex-basis: 75%;
max-width: 75%;
}
.col-10 {
flex-basis: 83.333%;
max-width: 83.333%;
}
.col-11 {
flex-basis: 91.667%;
max-width: 91.667%;
}
.col-12 {
flex-basis: 100%;
max-width: 100%;
}
.col-offset-0 {
margin-left: 0;
}
.col-offset-1 {
margin-left: 8.333%;
}
.col-offset-2 {
margin-left: 16.666%;
}
.col-offset-3 {
margin-left: 25%;
}
.col-offset-4 {
margin-left: 33.333%;
}
.col-offset-5 {
margin-left: 41.667%;
}
.col-offset-6 {
margin-left: 50%;
}
.col-offset-7 {
margin-left: 58.333%;
}
.col-offset-8 {
margin-left: 66.667%;
}
.col-offset-9 {
margin-left: 75%;
}
.col-offset-10 {
margin-left: 83.333%;
}
.col-offset-11 {
margin-left: 91.667%;
}
.grid-start {
justify-content: flex-start;
text-align: start;
}
.grid-center {
justify-content: center;
text-align: center;
}
.grid-end {
justify-content: flex-end;
text-align: end;
}
.grid-top {
align-items: flex-start;
}
.grid-middle {
align-items: center;
}
.grid-bottom {
align-items: flex-end;
}
.grid-around {
justify-content: space-around;
}
.grid-between {
justify-content: space-between;
}
.grid-first {
order: -1;
}
.grid-last {
order: 1;
}
@media only screen and (min-width: $m-grid-screen-xs) {
.col-xs,
.col-xs-1,
.col-xs-2,
.col-xs-3,
.col-xs-4,
.col-xs-5,
.col-xs-6,
.col-xs-7,
.col-xs-8,
.col-xs-9,
.col-xs-10,
.col-xs-11,
.col-xs-12,
.col-xs-offset-0,
.col-xs-offset-1,
.col-xs-offset-2,
.col-xs-offset-3,
.col-xs-offset-4,
.col-xs-offset-5,
.col-xs-offset-6,
.col-xs-offset-7,
.col-xs-offset-8,
.col-xs-offset-9,
.col-xs-offset-10,
.col-xs-offset-11,
.col-xs-offset-12 {
flex: 0 0 auto;
padding-right: $m-grid-padding-right / 2;
padding-left: $m-grid-padding-left / 2;
}
.col-xs {
flex-grow: 1;
flex-basis: 0;
max-width: 100%;
}
.col-xs-1 {
flex-basis: 8.333%;
max-width: 8.333%;
}
.col-xs-2 {
flex-basis: 16.666%;
max-width: 16.666%;
}
.col-xs-3 {
flex-basis: 25%;
max-width: 25%;
}
.col-xs-4 {
flex-basis: 33.333%;
max-width: 33.333%;
}
.col-xs-5 {
flex-basis: 41.667%;
max-width: 41.667%;
}
.col-xs-6 {
flex-basis: 50%;
max-width: 50%;
}
.col-xs-7 {
flex-basis: 58.333%;
max-width: 58.333%;
}
.col-xs-8 {
flex-basis: 66.667%;
max-width: 66.667%;
}
.col-xs-9 {
flex-basis: 75%;
max-width: 75%;
}
.col-xs-10 {
flex-basis: 83.333%;
max-width: 83.333%;
}
.col-xs-11 {
flex-basis: 91.667%;
max-width: 91.667%;
}
.col-xs-12 {
flex-basis: 100%;
max-width: 100%;
}
.col-xs-offset-0 {
margin-left: 0;
}
.col-xs-offset-1 {
margin-left: 8.333%;
}
.col-xs-offset-2 {
margin-left: 16.666%;
}
.col-xs-offset-3 {
margin-left: 25%;
}
.col-xs-offset-4 {
margin-left: 33.333%;
}
.col-xs-offset-5 {
margin-left: 41.667%;
}
.col-xs-offset-6 {
margin-left: 50%;
}
.col-xs-offset-7 {
margin-left: 58.333%;
}
.col-xs-offset-8 {
margin-left: 66.667%;
}
.col-xs-offset-9 {
margin-left: 75%;
}
.col-xs-offset-10 {
margin-left: 83.333%;
}
.col-xs-offset-11 {
margin-left: 91.667%;
}
.grid-start-xs {
justify-content: flex-start;
text-align: start;
}
.grid-center-xs {
justify-content: center;
text-align: center;
}
.grid-end-xs {
justify-content: flex-end;
text-align: end;
}
.grid-top-xs {
align-items: flex-start;
}
.grid-middle-xs {
align-items: center;
}
.grid-bottom-xs {
align-items: flex-end;
}
.grid-around-xs {
justify-content: space-around;
}
.grid-between-xs {
justify-content: space-between;
}
.grid-first-xs {
order: -1;
}
.grid-last-xs {
order: 1;
}
}
@media only screen and (min-width: $m-grid-screen-sm) {
// Inactive to avoid potential conflicts - We might use this later in the Consumer project rebuild
// .container {
// width: $m-grid-screen-sm - ($m-grid-padding-left + $m-grid-padding-right);
// }
.col-sm,
.col-sm-1,
.col-sm-2,
.col-sm-3,
.col-sm-4,
.col-sm-5,
.col-sm-6,
.col-sm-7,
.col-sm-8,
.col-sm-9,
.col-sm-10,
.col-sm-11,
.col-sm-12,
.col-sm-offset-0,
.col-sm-offset-1,
.col-sm-offset-2,
.col-sm-offset-3,
.col-sm-offset-4,
.col-sm-offset-5,
.col-sm-offset-6,
.col-sm-offset-7,
.col-sm-offset-8,
.col-sm-offset-9,
.col-sm-offset-10,
.col-sm-offset-11,
.col-sm-offset-12 {
flex: 0 0 auto;
padding-right: $m-grid-padding-right / 2;
padding-left: $m-grid-padding-left / 2;
}
.col-sm {
flex-grow: 1;
flex-basis: 0;
max-width: 100%;
}
.col-sm-1 {
flex-basis: 8.333%;
max-width: 8.333%;
}
.col-sm-2 {
flex-basis: 16.666%;
max-width: 16.666%;
}
.col-sm-3 {
flex-basis: 25%;
max-width: 25%;
}
.col-sm-4 {
flex-basis: 33.333%;
max-width: 33.333%;
}
.col-sm-5 {
flex-basis: 41.667%;
max-width: 41.667%;
}
.col-sm-6 {
flex-basis: 50%;
max-width: 50%;
}
.col-sm-7 {
flex-basis: 58.333%;
max-width: 58.333%;
}
.col-sm-8 {
flex-basis: 66.667%;
max-width: 66.667%;
}
.col-sm-9 {
flex-basis: 75%;
max-width: 75%;
}
.col-sm-10 {
flex-basis: 83.333%;
max-width: 83.333%;
}
.col-sm-11 {
flex-basis: 91.667%;
max-width: 91.667%;
}
.col-sm-12 {
flex-basis: 100%;
max-width: 100%;
}
.col-sm-offset-0 {
margin-left: 0;
}
.col-sm-offset-1 {
margin-left: 8.333%;
}
.col-sm-offset-2 {
margin-left: 16.666%;
}
.col-sm-offset-3 {
margin-left: 25%;
}
.col-sm-offset-4 {
margin-left: 33.333%;
}
.col-sm-offset-5 {
margin-left: 41.667%;
}
.col-sm-offset-6 {
margin-left: 50%;
}
.col-sm-offset-7 {
margin-left: 58.333%;
}
.col-sm-offset-8 {
margin-left: 66.667%;
}
.col-sm-offset-9 {
margin-left: 75%;
}
.col-sm-offset-10 {
margin-left: 83.333%;
}
.col-sm-offset-11 {
margin-left: 91.667%;
}
.grid-start-sm {
justify-content: flex-start;
text-align: start;
}
.grid-center-sm {
justify-content: center;
text-align: center;
}
.grid-end-sm {
justify-content: flex-end;
text-align: end;
}
.grid-top-sm {
align-items: flex-start;
}
.grid-middle-sm {
align-items: center;
}
.grid-bottom-sm {
align-items: flex-end;
}
.grid-around-sm {
justify-content: space-around;
}
.grid-between-sm {
justify-content: space-between;
}
.grid-first-sm {
order: -1;
}
.grid-last-sm {
order: 1;
}
}
@media only screen and (min-width: $m-grid-screen-md) {
// Inactive to avoid potential conflicts - We might use this later in the Consumer project rebuild
// .container {
// width: $m-grid-screen-md - ($m-grid-padding-left + $m-grid-padding-right);
// }
.col-md,
.col-md-1,
.col-md-2,
.col-md-3,
.col-md-4,
.col-md-5,
.col-md-6,
.col-md-7,
.col-md-8,
.col-md-9,
.col-md-10,
.col-md-11,
.col-md-12,
.col-md-offset-0,
.col-md-offset-1,
.col-md-offset-2,
.col-md-offset-3,
.col-md-offset-4,
.col-md-offset-5,
.col-md-offset-6,
.col-md-offset-7,
.col-md-offset-8,
.col-md-offset-9,
.col-md-offset-10,
.col-md-offset-11,
.col-md-offset-12 {
flex: 0 0 auto;
padding-right: $m-grid-padding-right / 2;
padding-left: $m-grid-padding-left / 2;
}
.col-md {
flex-grow: 1;
flex-basis: 0;
max-width: 100%;
}
.col-md-1 {
flex-basis: 8.333%;
max-width: 8.333%;
}
.col-md-2 {
flex-basis: 16.666%;
max-width: 16.666%;
}
.col-md-3 {
flex-basis: 25%;
max-width: 25%;
}
.col-md-4 {
flex-basis: 33.333%;
max-width: 33.333%;
}
.col-md-5 {
flex-basis: 41.667%;
max-width: 41.667%;
}
.col-md-6 {
flex-basis: 50%;
max-width: 50%;
}
.col-md-7 {
flex-basis: 58.333%;
max-width: 58.333%;
}
.col-md-8 {
flex-basis: 66.667%;
max-width: 66.667%;
}
.col-md-9 {
flex-basis: 75%;
max-width: 75%;
}
.col-md-10 {
flex-basis: 83.333%;
max-width: 83.333%;
}
.col-md-11 {
flex-basis: 91.667%;
max-width: 91.667%;
}
.col-md-12 {
flex-basis: 100%;
max-width: 100%;
}
.col-md-offset-0 {
margin-left: 0;
}
.col-md-offset-1 {
margin-left: 8.333%;
}
.col-md-offset-2 {
margin-left: 16.666%;
}
.col-md-offset-3 {
margin-left: 25%;
}
.col-md-offset-4 {
margin-left: 33.333%;
}
.col-md-offset-5 {
margin-left: 41.667%;
}
.col-md-offset-6 {
margin-left: 50%;
}
.col-md-offset-7 {
margin-left: 58.333%;
}
.col-md-offset-8 {
margin-left: 66.667%;
}
.col-md-offset-9 {
margin-left: 75%;
}
.col-md-offset-10 {
margin-left: 83.333%;
}
.col-md-offset-11 {
margin-left: 91.667%;
}
.grid-start-md {
justify-content: flex-start;
text-align: start;
}
.center-md {
justify-content: center;
text-align: center;
}
.end-md {
justify-content: flex-end;
text-align: end;
}
.grid-top-md {
align-items: flex-start;
}
.grid-middle-md {
align-items: center;
}
.grid-bottom-md {
align-items: flex-end;
}
.grid-around-md {
justify-content: space-around;
}
.grid-between-md {
justify-content: space-between;
}
.grid-first-md {
order: -1;
}
.grid-last-md {
order: 1;
}
}
@media only screen and (min-width: $m-grid-screen-lg) {
// Inactive to avoid potential conflicts - We might use this later in the Consumer project rebuild
// .container {
// width: $m-grid-screen-lg - ($m-grid-padding-left + $m-grid-padding-right);
// }
.col-lg,
.col-lg-1,
.col-lg-2,
.col-lg-3,
.col-lg-4,
.col-lg-5,
.col-lg-6,
.col-lg-7,
.col-lg-8,
.col-lg-9,
.col-lg-10,
.col-lg-11,
.col-lg-12,
.col-lg-offset-0,
.col-lg-offset-1,
.col-lg-offset-2,
.col-lg-offset-3,
.col-lg-offset-4,
.col-lg-offset-5,
.col-lg-offset-6,
.col-lg-offset-7,
.col-lg-offset-8,
.col-lg-offset-9,
.col-lg-offset-10,
.col-lg-offset-11,
.col-lg-offset-12 {
flex: 0 0 auto;
padding-right: $m-grid-padding-right / 2;
padding-left: $m-grid-padding-left / 2;
}
.col-lg {
flex-grow: 1;
flex-basis: 0;
max-width: 100%;
}
.col-lg-1 {
flex-basis: 8.333%;
max-width: 8.333%;
}
.col-lg-2 {
flex-basis: 16.666%;
max-width: 16.666%;
}
.col-lg-3 {
flex-basis: 25%;
max-width: 25%;
}
.col-lg-4 {
flex-basis: 33.333%;
max-width: 33.333%;
}
.col-lg-5 {
flex-basis: 41.667%;
max-width: 41.667%;
}
.col-lg-6 {
flex-basis: 50%;
max-width: 50%;
}
.col-lg-7 {
flex-basis: 58.333%;
max-width: 58.333%;
}
.col-lg-8 {
flex-basis: 66.667%;
max-width: 66.667%;
}
.col-lg-9 {
flex-basis: 75%;
max-width: 75%;
}
.col-lg-10 {
flex-basis: 83.333%;
max-width: 83.333%;
}
.col-lg-11 {
flex-basis: 91.667%;
max-width: 91.667%;
}
.col-lg-12 {
flex-basis: 100%;
max-width: 100%;
}
.col-lg-offset-0 {
margin-left: 0;
}
.col-lg-offset-1 {
margin-left: 8.333%;
}
.col-lg-offset-2 {
margin-left: 16.666%;
}
.col-lg-offset-3 {
margin-left: 25%;
}
.col-lg-offset-4 {
margin-left: 33.333%;
}
.col-lg-offset-5 {
margin-left: 41.667%;
}
.col-lg-offset-6 {
margin-left: 50%;
}
.col-lg-offset-7 {
margin-left: 58.333%;
}
.col-lg-offset-8 {
margin-left: 66.667%;
}
.col-lg-offset-9 {
margin-left: 75%;
}
.col-lg-offset-10 {
margin-left: 83.333%;
}
.col-lg-offset-11 {
margin-left: 91.667%;
}
.grid-start-lg {
justify-content: flex-start;
text-align: start;
}
.center-lg {
justify-content: center;
text-align: center;
}
.end-lg {
justify-content: flex-end;
text-align: end;
}
.grid-top-lg {
align-items: flex-start;
}
.grid-middle-lg {
align-items: center;
}
.grid-bottom-lg {
align-items: flex-end;
}
.grid-around-lg {
justify-content: space-around;
}
.grid-between-lg {
justify-content: space-between;
}
.grid-first-lg {
order: -1;
}
.grid-last-lg {
order: 1;
}
}
// scss-lint:enable SelectorFormat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment