Skip to content

Commit

Permalink
Fixed columns on IE when device width is small
Browse files Browse the repository at this point in the history
  • Loading branch information
bencoveney committed Sep 14, 2016
1 parent a77f097 commit 6ed8a43
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
7 changes: 7 additions & 0 deletions src/_Column.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
min-width: $container-max-width / $maximum-items-per-row;
margin-bottom: $gutter-width-vertical;
padding: 0 $gutter-width;

// Smaller than mobile screen
@media (max-width: $columns-as-rows-threshold) {
flex-basis: auto;
}
}

// Vertical alignment options.
Expand Down Expand Up @@ -68,6 +73,7 @@
@media (min-width: $columns-as-rows-threshold) {
@for $i from 1 through $maximum-items-per-row {
$percent: percentage((1 / $maximum-items-per-row) * $i);

&.#{$rule-prefix}column-wide-#{$i} {
@include column-wide($percent);
}
Expand All @@ -80,6 +86,7 @@
@media (min-width: $columns-as-rows-threshold) {
@for $i from 1 through $maximum-items-per-row {
$percent: percentage((1 / $maximum-items-per-row) * $i);

&.#{$rule-prefix}column-offset-#{$i} {
@include column-offset($percent);
}
Expand Down
6 changes: 3 additions & 3 deletions src/_Page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

h1.title {
background-color: transparent;
font-size: 4em;
border-bottom: 0;
font-size: 4em;
margin: 0;
padding: 0;
text-shadow: 2px 2px 5px $shadow-color;
Expand All @@ -22,9 +22,9 @@
// Gives full width muted footer styling.
.footer {
background-color: $background-color-shaded;
border-top: .1rem solid $theme-color;
color: $foreground-color-lightened;
margin-top: 4.7rem;
padding: 2.4rem 2.4rem 4.8rem 2.4rem;
padding: 2.4rem 2.4rem 4.8rem;
text-align: center;
border-top: .1rem solid $theme-color;
}
2 changes: 1 addition & 1 deletion src/_Row.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
flex-wrap: wrap;

// Fill the parent container
width: calc(100% + 2.0rem);
width: calc(100% + 2rem);

// Smaller than mobile screen
@media (max-width: $columns-as-rows-threshold) {
Expand Down
4 changes: 2 additions & 2 deletions src/_Text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ body {

// Reset options
*,
*:after,
*:before {
*::after,
*::before {
// Set box-sizing globally to handle padding and border widths
box-sizing: inherit;

Expand Down
6 changes: 3 additions & 3 deletions src/_Variables.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// An optional prefix to place in front of all css rules.
// This allows for compatibility with other frameworks which share class names (i.e. Bootstrap, Milligram).
// Example: "mg-"
$rule-prefix: "" !default;
// Example: 'mg-'
$rule-prefix: '' !default;

// Grid width
$container-max-width: 120rem !default;
Expand Down Expand Up @@ -29,7 +29,7 @@ $theme-color-darkened: #793d9e !default;

$foreground-color: #222 !default;
$foreground-color-lightened: #777 !default;
$foreground-color-inverted: #FFF !default;
$foreground-color-inverted: #fff !default;

$background-color-shaded: #eee !default;
$background-color-inverted: #222 !default;
Expand Down

0 comments on commit 6ed8a43

Please sign in to comment.