-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(layout): 'flex' change per recommended workarounds #6205
Changes from 3 commits
33dd0a1
800dd43
17c3466
3fd83bd
bb0fd20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,50 @@ | ||
|
||
<div ng-controller="AppCtrl" class="md-padding" ng-cloak> | ||
<fieldset class="standard"> | ||
<legend>Using <code>ng-model</code></legend> | ||
<div layout="row" layout-wrap> | ||
<div flex="50"> | ||
<md-checkbox ng-model="data.cb1" aria-label="Checkbox 1"> | ||
Checkbox 1: {{ data.cb1 }} | ||
</md-checkbox> | ||
<div> | ||
<fieldset class="standard"> | ||
<legend>Using <code>ng-model</code></legend> | ||
<div layout="column" layout-wrap layout-gt-sm="row" > | ||
<div flex-xs flex="50"> | ||
<md-checkbox ng-model="data.cb1" aria-label="Checkbox 1"> | ||
Checkbox 1: {{ data.cb1 }} | ||
</md-checkbox> | ||
</div> | ||
<div flex-xs flex="50"> | ||
<div layout-xs="column" flex-xs="100"> | ||
<md-checkbox | ||
ng-model="data.cb2" | ||
aria-label="Checkbox 2" | ||
ng-true-value="'yup'" | ||
ng-false-value="'nope'" | ||
class="md-warn md-align-top-left" flex> | ||
Checkbox 2 (md-warn) <br/> | ||
<span class="ipsum"> | ||
Duis placerat lectus et justo mollis, nec sodales orci congue. Vestibulum semper non urna ac suscipit. | ||
Vestibulum tempor, ligula id laoreet hendrerit, massa augue iaculis magna, | ||
sit amet dapibus tortor ligula non nibh. | ||
</span> | ||
<br/> | ||
{{ data.cb2 }} | ||
</md-checkbox> | ||
</div> | ||
</div> | ||
<div flex-xs flex="50"> | ||
<md-checkbox ng-disabled="true" aria-label="Disabled checkbox" ng-model="data.cb3"> | ||
Checkbox: Disabled | ||
</md-checkbox> | ||
</div> | ||
<div flex-xs flex="50"> | ||
<md-checkbox ng-disabled="true" aria-label="Disabled checked checkbox" ng-model="data.cb4" ng-init="data.cb4=true"> | ||
Checkbox: Disabled, Checked | ||
</md-checkbox> | ||
</div> | ||
<div flex-xs flex="50"> | ||
<md-checkbox md-no-ink aria-label="Checkbox No Ink" ng-model="data.cb5" class="md-primary"> | ||
Checkbox (md-primary): No Ink | ||
</md-checkbox> | ||
</div> | ||
</div> | ||
<div flex="50"> | ||
<md-checkbox | ||
ng-model="data.cb2" | ||
aria-label="Checkbox 2" | ||
ng-true-value="'yup'" | ||
ng-false-value="'nope'" | ||
class="md-warn md-align-top-left"> | ||
Checkbox 2 (md-warn) <br/> | ||
<span class="ipsum"> | ||
Duis placerat lectus et justo mollis, nec sodales orci congue. Vestibulum semper non urna ac suscipit. | ||
Vestibulum tempor, ligula id laoreet hendrerit, massa augue iaculis magna, | ||
sit amet dapibus tortor ligula non nibh. | ||
</span> | ||
<br/> | ||
{{ data.cb2 }} | ||
</md-checkbox> | ||
</div> | ||
<div flex="50"> | ||
<md-checkbox ng-disabled="true" aria-label="Disabled checkbox" ng-model="data.cb3"> | ||
Checkbox: Disabled | ||
</md-checkbox> | ||
</div> | ||
<div flex="50"> | ||
<md-checkbox ng-disabled="true" aria-label="Disabled checked checkbox" ng-model="data.cb4" ng-init="data.cb4=true"> | ||
Checkbox: Disabled, Checked | ||
</md-checkbox> | ||
</div> | ||
<div flex="50"> | ||
<md-checkbox md-no-ink aria-label="Checkbox No Ink" ng-model="data.cb5" class="md-primary"> | ||
Checkbox (md-primary): No Ink | ||
</md-checkbox> | ||
</div> | ||
</div> | ||
</fieldset> | ||
</fieldset> | ||
|
||
</div> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
div.flex-xs { | ||
min-height:40px; | ||
|
||
} | ||
.checkboxDemo1 div { | ||
clear: both; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,8 +112,8 @@ | |
display: -ms-flexbox; | ||
display: flex; | ||
} | ||
.layout#{$name}-column { flex-direction: column; } | ||
.layout#{$name}-row { flex-direction: row; } | ||
.layout#{$name}-column { flex-direction: column; flex-shrink: 0; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This won't change any existing behavior? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does not appear to change anything. But I also can not validate its value. I will redact this for now. |
||
.layout#{$name}-row { flex-direction: row; } | ||
} | ||
|
||
@mixin flex-properties-for-name($name: null) { | ||
|
@@ -131,6 +131,7 @@ | |
.#{$flexName}-auto { flex: 1 1 auto; box-sizing: border-box; } | ||
.#{$flexName}-none { flex: 0 0 auto; box-sizing: border-box; } | ||
.#{$flexName}-noshrink { flex: 1 0 auto; box-sizing: border-box; } | ||
.#{$flexName}-nogrow { flex: 0 1 auto; box-sizing: border-box; } | ||
|
||
// (1-20) * 5 = 0-100% | ||
@for $i from 0 through 20 { | ||
|
@@ -510,3 +511,10 @@ | |
} | ||
|
||
} | ||
|
||
// IE mediaQuery hack for 8,9,10 to set the flex-basis properly for 'flex' values | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. More background on this? What it's fixing and a reference link for the fix would be good. |
||
@media screen\0 { | ||
.flex, .flex-xs, .flex-gt-xs, .flex-sm, .flex-gt-sm, .flex-md, .flex-gt-md, .flex-lg, .flex-gt-lg, .flex-xl { | ||
flex: 1 1 0%; | ||
} | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jelbourn - this is intended as an hack for IE-only CSS . There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still want more info commented on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block needs a comment as to what it's doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
existing code.