Skip to content

Commit 1932dca

Browse files
committed
Grid fixing foreva
1 parent 28b3a25 commit 1932dca

File tree

6 files changed

+48
-52
lines changed

6 files changed

+48
-52
lines changed

dist/components/grid.css

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,10 +1208,9 @@ body > .ui.grid {
12081208
-ms-flex-direction: column;
12091209
flex-direction: column;
12101210
vertical-align: top;
1211-
-webkit-box-pack: start !important;
1212-
-webkit-justify-content: flex-start !important;
1213-
-ms-flex-pack: start !important;
1214-
justify-content: flex-start !important;
1211+
-webkit-align-self: flex-start !important;
1212+
-ms-flex-item-align: start !important;
1213+
align-self: flex-start !important;
12151214
}
12161215

12171216
/* Middle Aligned */
@@ -1225,10 +1224,9 @@ body > .ui.grid {
12251224
-ms-flex-direction: column;
12261225
flex-direction: column;
12271226
vertical-align: middle;
1228-
-webkit-box-pack: center !important;
1229-
-webkit-justify-content: center !important;
1230-
-ms-flex-pack: center !important;
1231-
justify-content: center !important;
1227+
-webkit-align-self: center !important;
1228+
-ms-flex-item-align: center !important;
1229+
align-self: center !important;
12321230
}
12331231

12341232
/* Bottom Aligned */
@@ -1242,10 +1240,9 @@ body > .ui.grid {
12421240
-ms-flex-direction: column;
12431241
flex-direction: column;
12441242
vertical-align: bottom;
1245-
-webkit-box-pack: end !important;
1246-
-webkit-justify-content: flex-end !important;
1247-
-ms-flex-pack: end !important;
1248-
justify-content: flex-end !important;
1243+
-webkit-align-self: flex-end !important;
1244+
-ms-flex-item-align: end !important;
1245+
align-self: flex-end !important;
12491246
}
12501247

12511248
/* Stretched */
@@ -1258,10 +1255,9 @@ body > .ui.grid {
12581255
display: -webkit-inline-flex !important;
12591256
display: -ms-inline-flexbox !important;
12601257
display: inline-flex !important;
1261-
-webkit-box-pack: stretch;
1262-
-webkit-justify-content: stretch;
1263-
-ms-flex-pack: stretch;
1264-
justify-content: stretch;
1258+
-webkit-align-self: stretch;
1259+
-ms-flex-item-align: stretch;
1260+
align-self: stretch;
12651261
-webkit-box-orient: vertical;
12661262
-webkit-box-direction: normal;
12671263
-webkit-flex-direction: column;

dist/components/grid.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/semantic.css

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16143,10 +16143,9 @@ body > .ui.grid {
1614316143
-ms-flex-direction: column;
1614416144
flex-direction: column;
1614516145
vertical-align: top;
16146-
-webkit-box-pack: start !important;
16147-
-webkit-justify-content: flex-start !important;
16148-
-ms-flex-pack: start !important;
16149-
justify-content: flex-start !important;
16146+
-webkit-align-self: flex-start !important;
16147+
-ms-flex-item-align: start !important;
16148+
align-self: flex-start !important;
1615016149
}
1615116150

1615216151
/* Middle Aligned */
@@ -16161,10 +16160,9 @@ body > .ui.grid {
1616116160
-ms-flex-direction: column;
1616216161
flex-direction: column;
1616316162
vertical-align: middle;
16164-
-webkit-box-pack: center !important;
16165-
-webkit-justify-content: center !important;
16166-
-ms-flex-pack: center !important;
16167-
justify-content: center !important;
16163+
-webkit-align-self: center !important;
16164+
-ms-flex-item-align: center !important;
16165+
align-self: center !important;
1616816166
}
1616916167

1617016168
/* Bottom Aligned */
@@ -16179,10 +16177,9 @@ body > .ui.grid {
1617916177
-ms-flex-direction: column;
1618016178
flex-direction: column;
1618116179
vertical-align: bottom;
16182-
-webkit-box-pack: end !important;
16183-
-webkit-justify-content: flex-end !important;
16184-
-ms-flex-pack: end !important;
16185-
justify-content: flex-end !important;
16180+
-webkit-align-self: flex-end !important;
16181+
-ms-flex-item-align: end !important;
16182+
align-self: flex-end !important;
1618616183
}
1618716184

1618816185
/* Stretched */
@@ -16196,10 +16193,9 @@ body > .ui.grid {
1619616193
display: -webkit-inline-flex !important;
1619716194
display: -ms-inline-flexbox !important;
1619816195
display: inline-flex !important;
16199-
-webkit-box-pack: stretch;
16200-
-webkit-justify-content: stretch;
16201-
-ms-flex-pack: stretch;
16202-
justify-content: stretch;
16196+
-webkit-align-self: stretch;
16197+
-ms-flex-item-align: stretch;
16198+
align-self: stretch;
1620316199
-webkit-box-orient: vertical;
1620416200
-webkit-box-direction: normal;
1620516201
-webkit-flex-direction: column;

dist/semantic.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/grid.html

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@
4949
margin-top: 10em;
5050
}
5151

52+
img {
53+
display: block;
54+
max-width: 100%;
55+
}
56+
img + img {
57+
margin-top: 0.5em;
58+
}
59+
5260
/* Shows content box (not negative margins) */
5361
.grid {
5462
position: relative;
@@ -67,8 +75,8 @@
6775
.celled.grid:before {
6876
display: none;
6977
}
70-
.ui.aligned .column:before {
71-
display: none;
78+
.ui.aligned .column:after {
79+
display: none !important;
7280
}
7381
.grid .column:not(.row):not(.grid):after {
7482
background-color: rgba(86,61,124,.15);
@@ -84,8 +92,6 @@
8492
<div class="ui text container">
8593
<h1 class="ui inverted block header">Top Level Grids</h1>
8694

87-
<p>There are two ways to lay out page content inside a grid. Each has its own benefits and drawbacks</p>
88-
8995
<h3 class="first">Page Grid</h3>
9096
<p>A <code>ui page grid</code> uses <code>padding</code> to maintain fluid page gutters. Each columns width will continuously adjust as your browser width changes to maintain the same percentage of overall browser width</p>
9197
<p>Page grids work best for wide multi-column pages like homepages.</p>
@@ -162,7 +168,7 @@ <h3 class="first">Column Flow</h3>
162168
<div class="four wide column"></div>
163169
</div>
164170

165-
<h3 class="first">Clearing Rows</h3>
171+
<h3>Clearing Rows</h3>
166172
<p>Adding row wrappers allow you to manually specify you want a new row to begin. This can be useful when centering content with a <code>ui centered grid</code>.</p>
167173

168174
<div class="ui centered grid">
@@ -179,7 +185,7 @@ <h3 class="first">Clearing Rows</h3>
179185
</div>
180186

181187

182-
<h3 class="first">Special Variations</h3>
188+
<h3>Special Variations</h3>
183189
<p>Some special variations that format grids like tables require you to specify rows. For example a <code>divided grid</code> or a <code>celled grid</code> requires row wrappers.</p>
184190

185191
<div class="ui horizontal section divider">Celled Grid</div>
@@ -253,7 +259,7 @@ <h3 class="first">Special Variations</h3>
253259
<h1 class="ui inverted block header">Adjusting Grids</h1>
254260

255261

256-
<h3 class="ui header">Centering Content</h3>
262+
<h3>Centering Content</h3>
257263
<p>If a row does not take up all sixteen grid columns, you can use a <code>ui centered grid</code>, <code>centered row</code>, or <code>centered column</code> to center the column contents inside the grid.
258264
</p>
259265
<div class="ui two column centered grid">
@@ -264,7 +270,7 @@ <h3 class="ui header">Centering Content</h3>
264270
</div>
265271
</div>
266272

267-
<h3 class="ui header">Floating Rows</h3>
273+
<h3>Floating Rows</h3>
268274
<p>Since Semantic UI's grid is based on flex box, a <code>left floated</code> item should come first, and a <code>right floated</code> item last in its row.</p>
269275

270276
<div class="ui grid">
@@ -281,7 +287,7 @@ <h3 class="ui header">Floating Rows</h3>
281287
</div>
282288

283289

284-
<h3 class="ui header">Text Alignment</h3>
290+
<h3>Text Alignment</h3>
285291
<p>You can specify text alignment using alignment variations on a grid, row, or column level.</p>
286292

287293
<div class="ui grid">
@@ -304,7 +310,7 @@ <h3 class="ui header">Text Alignment</h3>
304310
</div>
305311
</div>
306312

307-
<h3 class="ui header">Vertical Alignment</h3>
313+
<h3>Vertical Alignment</h3>
308314
<p>You can specify vertical alignment on a grid, row, or column level.</p>
309315
<div class="ui middle aligned four column centered grid">
310316
<div class="row">
@@ -321,8 +327,7 @@ <h3 class="ui header">Vertical Alignment</h3>
321327
</div>
322328
</div>
323329

324-
325-
<h3 class="first">Specifying Columns</h3>
330+
<h3 class="first">Specifying Column Count</h3>
326331
<p>Specifying a column count will divide columns into rows of predetermined column count. Additional columns will automatically flow to the next row.</p>
327332
<div class="ui three column grid">
328333
<div class="column">column</div>
@@ -349,8 +354,7 @@ <h3>Equal Width Columns</h3>
349354
</div>
350355
</div>
351356

352-
<h3>Specifying Column Width</h3>
353-
<p>Get three columns <strong>starting at desktops and scaling to large desktops</strong> of various widths Remember, grid columns should add up to sixteen for a single horizontal block More than that, and columns start stacking no matter the viewport</p>
357+
<h3>Individual Column Width</h3>
354358
<div class="ui three column grid">
355359
<div class="four wide column">four wide column</div>
356360
<div class="eight wide column">eight wide column</div>

src/definitions/collections/grid.less

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,7 +1185,7 @@ body > .ui.grid {
11851185
.ui.grid > .row > [class*="top aligned"].column {
11861186
flex-direction: column;
11871187
vertical-align: top;
1188-
justify-content: flex-start !important;
1188+
align-self: flex-start !important;
11891189
}
11901190

11911191
/* Middle Aligned */
@@ -1195,7 +1195,7 @@ body > .ui.grid {
11951195
.ui.grid > .row > [class*="middle aligned"].column {
11961196
flex-direction: column;
11971197
vertical-align: middle;
1198-
justify-content: center !important;
1198+
align-self: center !important;
11991199
}
12001200

12011201
/* Bottom Aligned */
@@ -1205,7 +1205,7 @@ body > .ui.grid {
12051205
.ui.grid > .row > [class*="bottom aligned"].column {
12061206
flex-direction: column;
12071207
vertical-align: bottom;
1208-
justify-content: flex-end !important;
1208+
align-self: flex-end !important;
12091209
}
12101210

12111211
/* Stretched */
@@ -1215,7 +1215,7 @@ body > .ui.grid {
12151215
.ui.grid > .stretched.column:not(.row),
12161216
.ui.grid > .row > .stretched.column {
12171217
display: inline-flex !important;
1218-
justify-content: stretch;
1218+
align-self: stretch;
12191219
flex-direction: column;
12201220
}
12211221

0 commit comments

Comments
 (0)