Skip to content

Commit 9c3647d

Browse files
committed
Select on protocol instead of domain
1 parent f165419 commit 9c3647d

File tree

1 file changed

+9
-20
lines changed

1 file changed

+9
-20
lines changed

assets/scss/_styles_project.scss

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -231,30 +231,19 @@ a:not(.btn):not(.td-sidebar-link):visited {
231231
color: $purple;
232232
}
233233

234-
// Define list of top-level domains
235-
$tlds: ".co", ".org", ".io", ".net", ".gov", ".edu", ".nl", ".de";
236-
237-
// Add external icon after links with the specified domains
238-
main a {
239-
@each $tld in $tlds {
240-
&[href*="#{$tld}"]:not(.btn)::after {
241-
display: inline-block;
242-
width: 1rem;
243-
height: 1rem;
244-
margin-left: .2rem;
245-
vertical-align: sub;
246-
content: url("/icons/external-unvisited.svg"); // Fill color is $link-color (blue-8 from PDS). Keep it updated with _variables_project.scss.
247-
}
248-
}
234+
// Add icon after external links in main content (but exclude buttons)
235+
main a[href*="https://"]:not(.btn)::after {
236+
display: inline-block;
237+
width: 1rem;
238+
height: 1rem;
239+
margin-left: .2rem;
240+
vertical-align: sub;
241+
content: url("/icons/external-unvisited.svg"); // Fill color is $link-color (blue-8 from PDS). Keep it updated with _variables_project.scss.
249242
}
250243

251244
// Change external link icon (color) upon hover
252-
main a {
253-
@each $tld in $tlds {
254-
&[href*="#{$tld}"]:hover:not(.btn)::after {
245+
main a[href*="https://"]:hover:not(.btn)::after {
255246
content: url("/icons/external-hover.svg"); // Fill color is $link-color (blue-8 from PDS). Keep it updated with _variables_project.scss.
256-
}
257-
}
258247
}
259248

260249
.btn {

0 commit comments

Comments
 (0)