Skip to content

Commit 962c2e3

Browse files
committed
Refactor grid row classes using SCSS @for loop
1 parent 0fd62f7 commit 962c2e3

File tree

2 files changed

+5
-21
lines changed

2 files changed

+5
-21
lines changed

static/css/devportal2024-v1.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.

styles/_cards.scss

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -150,26 +150,10 @@ a.card:hover h3 {
150150
.light .circled-logo {
151151
border: none;
152152
}
153-
.cols-of-1{
154-
grid-template-rows:repeat(1, min-content)
155-
}
156-
.cols-of-2{
157-
grid-template-rows:repeat(2, min-content)
158-
}
159-
.cols-of-3{
160-
grid-template-rows:repeat(3, min-content)
161-
}
162-
.cols-of-4{
163-
grid-template-rows:repeat(4, min-content)
164-
}
165-
.cols-of-5{
166-
grid-template-rows:repeat(5, min-content)
167-
}
168-
.cols-of-6{
169-
grid-template-rows:repeat(6, min-content)
170-
}
171-
.cols-of-7{
172-
grid-template-rows:repeat(7, min-content)
153+
@for $i from 1 through 10 {
154+
.cols-of-#{$i} {
155+
grid-template-rows: repeat(#{$i}, min-content);
156+
}
173157
}
174158
.card-deck {
175159
margin-top: 2.5rem;

0 commit comments

Comments
 (0)