Skip to content

Commit 0ba11b9

Browse files
committed
convivial-bootstrap-30750: Fix equal layout when one item only and update the spacing logic.
1 parent e15dcff commit 0ba11b9

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

components/views/_views.scss

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@
6060
&:not(:first-child) {
6161
margin-top: $grid-gutter-width;
6262
}
63-
&:last-child {
64-
margin-bottom: $grid-gutter-width;
65-
}
6663
}
6764
}
6865

@@ -148,6 +145,11 @@
148145
///
149146
.views-layout--equal .views-layout__item {
150147

148+
/* one item */
149+
&:only-of-type {
150+
width: 100%;
151+
}
152+
151153
/* two items */
152154
&:nth-of-type(1):nth-last-of-type(2),
153155
&:nth-of-type(1):nth-last-of-type(2) ~ .views-layout__item {
@@ -191,10 +193,18 @@
191193
/* six items */
192194
@include media-breakpoint-up(md) {
193195
width: calc(100 / 3 * 1%);
196+
197+
&:nth-child(-n+3) {
198+
margin-top: 0 !important;
199+
}
194200
}
195201

196202
@include media-breakpoint-up(lg) {
197203
width: calc(100 / 6 * 1%);
204+
205+
&:nth-child(-n+6) {
206+
margin-top: 0 !important;
207+
}
198208
}
199209
}
200210

css/style.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.

0 commit comments

Comments
 (0)