Skip to content

Commit 2733342

Browse files
committed
feat(layout): add flex fixed attribute to prevent shrinking
Fixes angular#6067
1 parent f6e97a0 commit 2733342

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/core/services/layout/layout.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
var SUFFIXES = /(-gt)?-(sm|md|lg)/g;
77
var WHITESPACE = /\s+/g;
88

9-
var FLEX_OPTIONS = ['grow', 'initial', 'auto', 'none'];
9+
var FLEX_OPTIONS = ['grow', 'initial', 'auto', 'none', 'fixed'];
1010
var LAYOUT_OPTIONS = ['row', 'column'];
1111
var ALIGNMENT_MAIN_AXIS= [ "", "start", "center", "end", "stretch", "space-around", "space-between" ];
1212
var ALIGNMENT_CROSS_AXIS= [ "", "start", "center", "end", "stretch" ];

src/core/services/layout/layout.scss

+1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@
130130
.#{$flexName}-initial { flex: 0 1 auto; box-sizing: border-box; }
131131
.#{$flexName}-auto { flex: 1 1 auto; box-sizing: border-box; }
132132
.#{$flexName}-none { flex: 0 0 auto; box-sizing: border-box; }
133+
.#{$flexName}-fixed { flex: 1 0 auto; box-sizing: border-box; }
133134

134135
// (1-20) * 5 = 0-100%
135136
@for $i from 0 through 20 {

0 commit comments

Comments
 (0)