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

Commit 90b64fe

Browse files
Scott Hyndmantinayuangao
authored andcommitted
fix(core): eliminates many (but not all) redundant rules in layout CSS (#10509)
More improvements to come.
1 parent e3f9772 commit 90b64fe

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

src/core/style/layout.scss

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -153,16 +153,6 @@
153153
box-sizing: border-box;
154154
}
155155

156-
.layout-row {
157-
> .#{$flexName}-33 , > .#{$flexName}-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; }
158-
> .#{$flexName}-66 , > .#{$flexName}-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; }
159-
}
160-
161-
.layout-column {
162-
> .#{$flexName}-33 , > .#{$flexName}-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; }
163-
> .#{$flexName}-66 , > .#{$flexName}-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; }
164-
}
165-
166156
.layout#{$name}-row > .#{$flexName}-#{$i * 5} {
167157
flex: 1 1 100%;
168158
max-width: #{$value};
@@ -182,24 +172,33 @@
182172
// Bug workaround for http://crbug.com/546034 - flex issues on Chrome 48
183173
@if $i == 0 { min-height: 0; }
184174
}
175+
}
176+
177+
.layout-row {
178+
> .#{$flexName}-33 { flex: 1 1 33.33%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; }
179+
> .#{$flexName}-66 { flex: 1 1 66.66%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; }
180+
}
185181

182+
.layout-column {
183+
> .#{$flexName}-33 { flex: 1 1 33.33%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; }
184+
> .#{$flexName}-66 { flex: 1 1 66.66%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; }
186185
}
187186

188187
.layout#{$name}-row {
189-
> .#{$flexName}-33 , > .#{$flexName}-33 { flex: 1 1 100%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; }
190-
> .#{$flexName}-66 , > .#{$flexName}-66 { flex: 1 1 100%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; }
188+
> .#{$flexName}-33 { flex: 1 1 100%; max-width: 33.33%; max-height: 100%; box-sizing: border-box; }
189+
> .#{$flexName}-66 { flex: 1 1 100%; max-width: 66.66%; max-height: 100%; box-sizing: border-box; }
191190

192191
// Bug workaround for http://crbug.com/546034 - flex issues on Chrome 48
193-
> .flex { min-width: 0; }
192+
> .flex { min-width: 0; }
194193

195194
}
196195

197196
.layout#{$name}-column {
198-
> .#{$flexName}-33 , > .#{$flexName}-33 { flex: 1 1 100%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; }
199-
> .#{$flexName}-66 , > .#{$flexName}-66 { flex: 1 1 100%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; }
197+
> .#{$flexName}-33 { flex: 1 1 100%; max-width: 100%; max-height: 33.33%; box-sizing: border-box; }
198+
> .#{$flexName}-66 { flex: 1 1 100%; max-width: 100%; max-height: 66.66%; box-sizing: border-box; }
200199

201200
// Bug workaround for http://crbug.com/546034 - flex issues on Chrome 48
202-
> .flex { min-height: 0; }
201+
> .flex { min-height: 0; }
203202
}
204203

205204
}

0 commit comments

Comments
 (0)