Skip to content

Commit fa8841a

Browse files
authored
chore: fix cta link hover issues (#153)
1 parent 0d7a5ff commit fa8841a

File tree

5 files changed

+50
-41
lines changed

5 files changed

+50
-41
lines changed

public/img/icon-link-arrow.svg

Lines changed: 1 addition & 0 deletions
Loading

src/pages/blog/[...page].astro

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,20 +162,23 @@ const { page } = Astro.props;
162162
border-radius: var(--border-radius);
163163
font-size: var(--step--1);
164164
background-image: var(--color-white);
165+
text-decoration: none;
165166
}
166167

167-
.cta__blog {
168+
.cta__blog p {
169+
flex: none;
168170
text-decoration-color: transparent;
171+
text-decoration-line: underline;
169172
transition: text-decoration-color 300ms ease-in-out;
170173
}
171174

172175
.cta__blog:hover {
173-
color: currentColor;
174-
text-decoration-color: currentColor;
176+
color: inherit;
175177
}
176178

177-
.cta__blog p {
178-
flex: none;
179+
.cta__blog:hover p {
180+
color: currentColor;
181+
text-decoration-color: currentColor;
179182
}
180183

181184
.cta__blog img {

src/pages/blog/es.astro

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,20 +149,24 @@ const esEntries = await getCollection("blog", ({ data }) => {
149149
border-radius: var(--border-radius);
150150
font-size: var(--step--1);
151151
background-image: var(--color-white);
152+
text-decoration: none;
152153
}
153154

154-
.cta__blog {
155+
.cta__blog p {
156+
flex: none;
155157
text-decoration-color: transparent;
158+
text-decoration-line: underline;
156159
transition: text-decoration-color 300ms ease-in-out;
157160
}
158161

159162
.cta__blog:hover {
160-
color: currentColor;
161-
text-decoration-color: currentColor;
163+
color: inherit;
162164
}
163165

164-
.cta__blog p {
165-
flex: none;
166+
.cta__blog:hover p {
167+
color: currentColor;
168+
text-decoration-color: currentColor;
169+
text-decoration-line: underline;
166170
}
167171

168172
.cta__blog img {

src/pages/index.astro

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import InterledgerIcon from "../components/logos/InterledgerIcon.astro";
44
import OpenPaymentsIcon from "../components/logos/OpenPaymentsIcon.astro";
55
import RafikiIcon from "../components/logos/RafikiIcon.astro";
66
import ExternalIcon from "../../public/img/icon-external.svg";
7+
import LinkArrow from "../../public/img/icon-link-arrow.svg";
78
---
89

910
<BaseLayout title="Developers">
@@ -22,13 +23,14 @@ import ExternalIcon from "../../public/img/icon-external.svg";
2223
<a
2324
class="btn hero__btn"
2425
href="/developers/get-involved"
25-
data-umami-event="Devs page link - Get involved">Get involved</a
26+
data-umami-event="Devs page link - Get involved"
27+
><span>Get involved</span> <LinkArrow /></a
2628
>
2729
<a
2830
href="https://github.com/interledger"
2931
target="_blank"
3032
rel="noopener noreferrer"
31-
>Contribute on Github
33+
><span>Contribute on Github</span>
3234
<ExternalIcon class="external" />
3335
</a>
3436
</div>
@@ -62,7 +64,8 @@ import ExternalIcon from "../../public/img/icon-external.svg";
6264
data-umami-event="Devs page link - GitHub"
6365
target="_blank"
6466
rel="noopener noreferrer"
65-
><OpenPaymentsIcon /> Open Payments Repo
67+
><OpenPaymentsIcon />
68+
Open Payments Repo
6669
<ExternalIcon class="external" />
6770
</a>
6871
</h2>
@@ -80,7 +83,8 @@ import ExternalIcon from "../../public/img/icon-external.svg";
8083
data-umami-event="Devs page link - Rafiki"
8184
target="_blank"
8285
rel="noopener noreferrer"
83-
><RafikiIcon /> Rafiki Repo
86+
><RafikiIcon />
87+
Rafiki Repo
8488
<ExternalIcon class="external" />
8589
</a>
8690
</h2>
@@ -98,7 +102,8 @@ import ExternalIcon from "../../public/img/icon-external.svg";
98102
data-umami-event="Devs page link - RFCs"
99103
target="_blank"
100104
rel="noopener noreferrer"
101-
><InterledgerIcon /> Specifications Repo
105+
><InterledgerIcon />
106+
Specifications Repo
102107
<ExternalIcon class="external" />
103108
</a>
104109
</h2>
@@ -119,7 +124,8 @@ import ExternalIcon from "../../public/img/icon-external.svg";
119124
data-umami-event="Devs page link - Testnet"
120125
target="_blank"
121126
rel="noopener noreferrer"
122-
><InterledgerIcon /> Test Network Repo
127+
><InterledgerIcon />
128+
Test Network Repo
123129
<ExternalIcon class="external" />
124130
</a>
125131
</h2>
@@ -152,7 +158,8 @@ import ExternalIcon from "../../public/img/icon-external.svg";
152158
<a
153159
class="btn card__btn"
154160
href="/developers/blog"
155-
data-umami-event="Devs page link - Blog">Read our blog</a
161+
data-umami-event="Devs page link - Blog"
162+
>Read our blog<LinkArrow /></a
156163
>
157164
</div>
158165
</div>
@@ -203,27 +210,32 @@ import ExternalIcon from "../../public/img/icon-external.svg";
203210
display: inline-flex;
204211
align-items: center;
205212
gap: var(--space-2xs);
206-
text-decoration-color: transparent;
207-
text-underline-offset: 4px;
208-
transition: text-decoration-color ease-in-out 200ms;
213+
text-decoration: none;
209214
}
210215

211-
.btn::after {
212-
content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"><path d="M11.92 5.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.004 1.004 0 0 0-1.42 1.42L8.59 5H1a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg>');
213-
flex: none;
216+
.btn svg {
214217
width: 0.6em;
215218
}
216219

217220
a {
221+
text-underline-offset: 4px;
222+
text-decoration: none;
223+
cursor: pointer;
224+
}
225+
226+
a span {
227+
text-decoration-line: underline;
218228
text-decoration-color: transparent;
219229
text-underline-offset: 4px;
220230
transition: text-decoration-color ease-in-out 200ms;
221-
cursor: pointer;
222231
}
223232

224233
a:hover {
225234
color: var(--color-white);
226-
text-decoration: underline;
235+
}
236+
237+
a:hover span {
238+
text-decoration-color: inherit;
227239
}
228240

229241
.external {
@@ -263,12 +275,13 @@ import ExternalIcon from "../../public/img/icon-external.svg";
263275
padding: var(--space-xs) var(--space-s);
264276
}
265277

266-
.hero__btn:hover {
267-
text-decoration-color: var(--color-primary);
278+
.hero__btn span {
279+
text-decoration-line: underline;
280+
text-decoration-color: transparent;
268281
}
269282

270-
.hero__btn::after {
271-
filter: var(--filter-primary);
283+
.hero__btn:hover {
284+
color: var(--color-primary);
272285
}
273286

274287
.image-wrapper {
@@ -356,12 +369,4 @@ import ExternalIcon from "../../public/img/icon-external.svg";
356369
margin-block-start: var(--space-xs);
357370
padding: var(--space-2xs) var(--space-xs);
358371
}
359-
360-
.card__btn:hover {
361-
color: var(--color-white);
362-
}
363-
364-
.card__btn::after {
365-
filter: var(--filter-white);
366-
}
367372
</style>

src/styles/pages.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@
7979
--color-primary: oklch(51.54% 0.088 194.77);
8080
--color-primary-bg-fallback: rgba(7, 121, 114, 0.1);
8181
--color-primary-bg: oklch(51.95% 0.089 187.7 / 0.1);
82-
--filter-primary: invert(18%) sepia(85%) saturate(4735%) hue-rotate(172deg)
83-
brightness(93%) contrast(101%);
84-
--filter-white: invert(100%) sepia(0%) saturate(2%) hue-rotate(110deg)
85-
brightness(108%) contrast(101%);
8682

8783
--color-header-bg: var(--color-white);
8884
--color-header-accent: #eee;

0 commit comments

Comments
 (0)