Skip to content

Commit f519c92

Browse files
committed
Avoid using odd-last class and use CSS instead
Signed-off-by: Manuel Rego Casasnovas <[email protected]>
1 parent 1603bd6 commit f519c92

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

_includes/sponsorship.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ <h3 class="center-text">Bronze Sponsors</h3>
8181

8282
<ul class="logos-home">
8383
{% for sponsor in bronze_sponsors %}
84-
{% assign mod = forloop.index | modulo: 2 %}
85-
<li class="{% if forloop.last and mod != 0 %}odd-last{% endif %}">
84+
<li>
8685
<a href="{{ sponsor.url }}">
8786
<img src="{{ sponsor.img | url}}" alt="{{ sponsor.name }} logo" class="sponsor-img sponsor-{{ sponsor.type }}" />
8887
</a>
@@ -137,11 +136,11 @@ <h3 class="center-text">Bronze Sponsors</h3>
137136
font-size: var(--step-1);
138137
}
139138

140-
.odd-last {
139+
.logos-home > li:nth-last-child(1):nth-child(odd) {
141140
grid-column: 1 / -1;
142141
}
143142

144-
.odd-last .sponsor-img {
143+
.logos-home > li:nth-last-child(1):nth-child(odd) .sponsor-img {
145144
padding: 1.25rem 0;
146145
max-width: 8rem;
147146
margin: 0 auto;

0 commit comments

Comments
 (0)