Skip to content

Commit c0e9a2e

Browse files
trueadmRich-Harris
andauthored
fix: improve homepage companies section styling (#414)
* fix: improve homepage companies section styling * fix: improve homepage companies section styling * fix: improve homepage companies section styling * make the h2 always double decker * too much margin * offset * simplify with grid * revert * break sooner * tweaks * tighten up a smidge --------- Co-authored-by: Rich Harris <[email protected]>
1 parent 21c754a commit c0e9a2e

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

apps/svelte.dev/src/routes/_home/Companies.svelte

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<div class="logos">
44
<enhanced:img src="./companies/ikea.svg" alt="Ikea logo" />
55
<enhanced:img src="./companies/mullvad.svg" alt="Mullvad logo" />
6-
<enhanced:img src="./companies/stack-overflow.svg" alt="Mullvad logo" />
7-
<enhanced:img src="./companies/yelp.svg" alt="New York Times logo" />
8-
<enhanced:img src="./companies/square.svg" alt="Mullvad logo" />
6+
<enhanced:img src="./companies/stack-overflow.svg" alt="Stack Overflow logo" />
7+
<enhanced:img src="./companies/yelp.svg" alt="Yelp logo" />
8+
<enhanced:img src="./companies/square.svg" alt="Square logo" />
99
<enhanced:img src="./companies/apple.svg" alt="Apple logo" />
1010
</div>
1111
</div>
@@ -26,20 +26,19 @@
2626
display: grid;
2727
gap: 1rem;
2828
align-items: center;
29+
justify-content: center;
2930
margin: 15rem 0 5rem 0;
3031
mask-size: 100%;
3132
mask-image: radial-gradient(ellipse 110rem 500%, white, white 70%, transparent);
3233
overflow: hidden;
3334
}
3435
3536
h2 {
36-
width: 100%;
37+
width: 10em;
3738
text-align: center;
38-
margin: 0 auto;
39-
position: absolute;
39+
justify-self: center;
4040
z-index: 2;
4141
filter: drop-shadow(0 0 1rem var(--sk-back-1)) drop-shadow(0 0 1rem var(--sk-back-1));
42-
padding: 0 var(--sk-page-padding-side);
4342
}
4443
4544
.wing {
@@ -55,29 +54,28 @@
5554
gap: 4rem;
5655
opacity: 0.5;
5756
58-
.wing:first-child & {
59-
right: 0;
60-
}
61-
62-
.wing:last-child & {
63-
left: 0;
64-
}
65-
6657
img {
6758
height: 100%;
6859
width: auto;
6960
}
7061
}
7162
72-
@media (min-width: 800px) {
63+
@media (min-width: 600px) {
7364
.companies {
7465
grid-template-columns: 1fr auto 1fr;
7566
align-items: center;
7667
}
7768
7869
h2 {
7970
position: relative;
80-
width: 12em;
71+
}
72+
73+
.wing:first-child .logos {
74+
right: 0;
75+
}
76+
77+
.wing:last-child .logos {
78+
left: 0;
8179
}
8280
8381
.logos {

0 commit comments

Comments
 (0)