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

Commit a4a42c5

Browse files
authored
Merge pull request #25 from jendowns/21/sizing-functions
feat(utilities): Add scss utility functions to find fixed and fluid sizes.
2 parents a510303 + f9c52bf commit a4a42c5

35 files changed

+976
-664
lines changed
Binary file not shown.

examples/bootstrap/css-gridish/css/bootstrap-grid-legacy.css

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -151,124 +151,124 @@ body {
151151
display: none; }
152152

153153
.bootstrap-grid__col--sm--1 {
154-
max-width: calc( 100rem / 12 * 1);
154+
max-width: 8.33333rem;
155155
min-width: 8.33333vw;
156156
width: 8.33333vw;
157157
grid-column: span 1; }
158158

159159
.bootstrap-grid__height-fluid--sm--1 {
160160
height: 8.33333vw;
161-
max-height: calc( 100rem / 12 * 1); }
161+
max-height: 8.33333rem; }
162162

163163
.bootstrap-grid__col--sm--2 {
164-
max-width: calc( 100rem / 12 * 2);
164+
max-width: 16.66667rem;
165165
min-width: 16.66667vw;
166166
width: 16.66667vw;
167167
grid-column: span 2; }
168168

169169
.bootstrap-grid__height-fluid--sm--2 {
170170
height: 16.66667vw;
171-
max-height: calc( 100rem / 12 * 2); }
171+
max-height: 16.66667rem; }
172172

173173
.bootstrap-grid__col--sm--3 {
174-
max-width: calc( 100rem / 12 * 3);
174+
max-width: 25rem;
175175
min-width: 25vw;
176176
width: 25vw;
177177
grid-column: span 3; }
178178

179179
.bootstrap-grid__height-fluid--sm--3 {
180180
height: 25vw;
181-
max-height: calc( 100rem / 12 * 3); }
181+
max-height: 25rem; }
182182

183183
.bootstrap-grid__col--sm--4 {
184-
max-width: calc( 100rem / 12 * 4);
184+
max-width: 33.33333rem;
185185
min-width: 33.33333vw;
186186
width: 33.33333vw;
187187
grid-column: span 4; }
188188

189189
.bootstrap-grid__height-fluid--sm--4 {
190190
height: 33.33333vw;
191-
max-height: calc( 100rem / 12 * 4); }
191+
max-height: 33.33333rem; }
192192

193193
.bootstrap-grid__col--sm--5 {
194-
max-width: calc( 100rem / 12 * 5);
194+
max-width: 41.66667rem;
195195
min-width: 41.66667vw;
196196
width: 41.66667vw;
197197
grid-column: span 5; }
198198

199199
.bootstrap-grid__height-fluid--sm--5 {
200200
height: 41.66667vw;
201-
max-height: calc( 100rem / 12 * 5); }
201+
max-height: 41.66667rem; }
202202

203203
.bootstrap-grid__col--sm--6 {
204-
max-width: calc( 100rem / 12 * 6);
204+
max-width: 50rem;
205205
min-width: 50vw;
206206
width: 50vw;
207207
grid-column: span 6; }
208208

209209
.bootstrap-grid__height-fluid--sm--6 {
210210
height: 50vw;
211-
max-height: calc( 100rem / 12 * 6); }
211+
max-height: 50rem; }
212212

213213
.bootstrap-grid__col--sm--7 {
214-
max-width: calc( 100rem / 12 * 7);
214+
max-width: 58.33333rem;
215215
min-width: 58.33333vw;
216216
width: 58.33333vw;
217217
grid-column: span 7; }
218218

219219
.bootstrap-grid__height-fluid--sm--7 {
220220
height: 58.33333vw;
221-
max-height: calc( 100rem / 12 * 7); }
221+
max-height: 58.33333rem; }
222222

223223
.bootstrap-grid__col--sm--8 {
224-
max-width: calc( 100rem / 12 * 8);
224+
max-width: 66.66667rem;
225225
min-width: 66.66667vw;
226226
width: 66.66667vw;
227227
grid-column: span 8; }
228228

229229
.bootstrap-grid__height-fluid--sm--8 {
230230
height: 66.66667vw;
231-
max-height: calc( 100rem / 12 * 8); }
231+
max-height: 66.66667rem; }
232232

233233
.bootstrap-grid__col--sm--9 {
234-
max-width: calc( 100rem / 12 * 9);
234+
max-width: 75rem;
235235
min-width: 75vw;
236236
width: 75vw;
237237
grid-column: span 9; }
238238

239239
.bootstrap-grid__height-fluid--sm--9 {
240240
height: 75vw;
241-
max-height: calc( 100rem / 12 * 9); }
241+
max-height: 75rem; }
242242

243243
.bootstrap-grid__col--sm--10 {
244-
max-width: calc( 100rem / 12 * 10);
244+
max-width: 83.33333rem;
245245
min-width: 83.33333vw;
246246
width: 83.33333vw;
247247
grid-column: span 10; }
248248

249249
.bootstrap-grid__height-fluid--sm--10 {
250250
height: 83.33333vw;
251-
max-height: calc( 100rem / 12 * 10); }
251+
max-height: 83.33333rem; }
252252

253253
.bootstrap-grid__col--sm--11 {
254-
max-width: calc( 100rem / 12 * 11);
254+
max-width: 91.66667rem;
255255
min-width: 91.66667vw;
256256
width: 91.66667vw;
257257
grid-column: span 11; }
258258

259259
.bootstrap-grid__height-fluid--sm--11 {
260260
height: 91.66667vw;
261-
max-height: calc( 100rem / 12 * 11); }
261+
max-height: 91.66667rem; }
262262

263263
.bootstrap-grid__col--sm--12 {
264-
max-width: calc( 100rem / 12 * 12);
264+
max-width: 100rem;
265265
min-width: 100vw;
266266
width: 100vw;
267267
grid-column: span 12; }
268268

269269
.bootstrap-grid__height-fluid--sm--12 {
270270
height: 100vw;
271-
max-height: calc( 100rem / 12 * 12); }
271+
max-height: 100rem; }
272272

273273
.bootstrap-padding {
274274
padding: calc(30px / 2); }
@@ -333,7 +333,7 @@ body {
333333
--bootstrap-height-28: 28rem;
334334
--bootstrap-height-29: 29rem; } }
335335

336-
@media (min-width: 100rem) {
336+
@media screen and (min-width: 100rem) {
337337
.bootstrap-grid__col--sm--0--only {
338338
display: block; }
339339
[class*="bootstrap-grid__col--xl--"] {
@@ -361,11 +361,11 @@ body {
361361
padding-top: calc(30px / 2); }
362362
@supports (display: grid) {
363363
.bootstrap-grid {
364-
grid-template-columns: repeat(auto-fill, calc( 100rem / 12)); }
364+
grid-template-columns: repeat(auto-fill, 8.33333rem); }
365365
.bootstrap-grid.bootstrap-grid--fixed-columns {
366366
grid-template-columns: repeat(auto-fill, 8.33333rem); }
367367
.bootstrap-grid.bootstrap-grid--fluid-rows {
368-
grid-auto-rows: calc( 100rem / 12); } } }
368+
grid-auto-rows: 8.33333rem; } } }
369369

370370
@supports (display: grid) {
371371
.bootstrap-grid > * {

examples/bootstrap/css-gridish/css/bootstrap-grid-legacy.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/bootstrap/css-gridish/css/bootstrap-grid.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ body {
144144
--bootstrap-height-28: 28rem;
145145
--bootstrap-height-29: 29rem; }
146146

147-
@media (min-width: 100rem) {
147+
@media screen and (min-width: 100rem) {
148148
.bootstrap-grid__col--sm--0--only {
149149
display: block; }
150150
[class*="bootstrap-grid__col--xl--"] {
@@ -169,8 +169,8 @@ body {
169169
padding-bottom: calc(30px / 2);
170170
padding-top: calc(30px / 2); }
171171
.bootstrap-grid {
172-
grid-template-columns: repeat(auto-fill, calc( 100rem / 12)); }
172+
grid-template-columns: repeat(auto-fill, 8.33333rem); }
173173
.bootstrap-grid.bootstrap-grid--fixed-columns {
174174
grid-template-columns: repeat(auto-fill, 8.33333rem); }
175175
.bootstrap-grid.bootstrap-grid--fluid-rows {
176-
grid-auto-rows: calc( 100rem / 12); } }
176+
grid-auto-rows: 8.33333rem; } }

0 commit comments

Comments
 (0)