Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix(layout): restore flex percentages
Browse files Browse the repository at this point in the history
IE has issues with `calc()` usages in flex styles; replace with 33.33% and 66.66%.

  Closes #6898
  • Loading branch information
ThomasBurleson committed Jan 28, 2016
1 parent b707375 commit 474c37a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/app/partials/layout-alignment.tmpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<p>
The <code>layout-align</code> directive takes two words.
The first word says how the children will be aligned in the lay3ut's direction, and the second word says how the children will be aligned perpendicular to the layout's direction.</p>
The first word says how the children will be aligned in the layout's direction, and the second word says how the children will be aligned perpendicular to the layout's direction.</p>

<p>Only one value is required for this directive.
For example, <code>layout="row" layout-align="center"</code> would make the elements
Expand Down
8 changes: 4 additions & 4 deletions src/core/services/layout/layout.attributes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ $layout-breakpoint-lg: 1920px !default;
}

[layout="row"], [layout#{$name}="row"] {
> [#{$flexName}="33"] , > [#{$flexName}="33"] { flex: 1 1 calc(100% / 3); max-width: calc(100% / 3); max-height: 100%; box-sizing: border-box; }
> [#{$flexName}="66"] , > [#{$flexName}="66"] { flex: 1 1 calc(200% / 3); max-width: calc(200% / 3); max-height: 100%; box-sizing: border-box; }
> [#{$flexName}="33"] , > [#{$flexName}="33"] { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; }
> [#{$flexName}="66"] , > [#{$flexName}="66"] { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; }

> .flex { min-width: 0; }
}
[layout="column"], [layout#{$name}="column"] {
> [#{$flexName}="33"] , > [#{$flexName}="33"] { flex: 1 1 calc(100% / 3); max-width: 100%; max-height: calc(100% / 3); box-sizing: border-box; }
> [#{$flexName}="66"] , > [#{$flexName}="66"] { flex: 1 1 calc(200% / 3); max-width: 100%; max-height: calc(200% / 3); box-sizing: border-box; }
> [#{$flexName}="33"] , > [#{$flexName}="33"] { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; }
> [#{$flexName}="66"] , > [#{$flexName}="66"] { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; }

> .flex { min-height: 0; }
}
Expand Down
8 changes: 4 additions & 4 deletions src/core/services/layout/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,15 @@
}

.layout-row, .layout#{$name}-row {
> .#{$flexName}-33 , > .#{$flexName}-33 { flex: 1 1 calc(100% / 3); max-width: calc(100% / 3); max-height: 100%; box-sizing: border-box; }
> .#{$flexName}-66 , > .#{$flexName}-66 { flex: 1 1 calc(200% / 3); max-width: calc(200% / 3); max-height: 100%; box-sizing: border-box; }
> .#{$flexName}-33 , > .#{$flexName}-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; }
> .#{$flexName}-66 , > .#{$flexName}-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; }

// Bug workaround for http://crbug.com/546034 - flex issues on Chrome 48
> .flex { min-width: 0; }
}
.layout-column, .layout#{$name}-column {
> .#{$flexName}-33 , > .#{$flexName}-33 { flex: 1 1 calc(100% / 3); max-width: 100%; max-height: calc(100% / 3); box-sizing: border-box; }
> .#{$flexName}-66 , > .#{$flexName}-66 { flex: 1 1 calc(200% / 3); max-width: 100%; max-height: calc(200% / 3); box-sizing: border-box; }
> .#{$flexName}-33 , > .#{$flexName}-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; }
> .#{$flexName}-66 , > .#{$flexName}-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; }

// Bug workaround for http://crbug.com/546034 - flex issues on Chrome 48
> .flex { min-height: 0; }
Expand Down

0 comments on commit 474c37a

Please sign in to comment.