mirror of
https://github.com/foo-dogsquared/hugo-theme-more-contentful.git
synced 2025-01-30 22:57:57 +00:00
Make external link styling site-wide
This commit is contained in:
parent
8d6e0797b5
commit
0aaea2ff63
@ -34,23 +34,31 @@ article {
|
||||
h1, h2, h3 {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
main {
|
||||
/* Select all links that are external. */
|
||||
a[href]:not(:where(
|
||||
a[href^="#"],
|
||||
a[href^="./"],
|
||||
a[href^="../"],
|
||||
a[href^="/"]:not(a[href^="//"]),
|
||||
))::after, a[rel~="external"]::after {
|
||||
color: var(--base05);
|
||||
font-size: 0.50em;
|
||||
content: " [🡕]";
|
||||
vertical-align: super;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Select all links that are external.
|
||||
|
||||
In this case, we'll just exclude all links that are...
|
||||
|
||||
- All internal anchors.
|
||||
- All links that points to a relative path.
|
||||
- All origin-relative URLs.
|
||||
|
||||
Also, all links that are explicitly marked as external are obviously
|
||||
considered.
|
||||
*/
|
||||
a[href]:not(:where(
|
||||
a[href^="#"],
|
||||
a[href^="./"],
|
||||
a[href^="../"],
|
||||
a[href^="/"]:not(a[href^="//"]),
|
||||
))::after, a[rel~="external"]::after {
|
||||
color: var(--base05);
|
||||
font-size: 0.50em;
|
||||
content: " [🡕]";
|
||||
vertical-align: super;
|
||||
}
|
||||
|
||||
/* Text formatting */
|
||||
h1, h2, h3,
|
||||
@ -230,6 +238,12 @@ aside {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
header, footer {
|
||||
a[href]::after {
|
||||
content: unset;
|
||||
}
|
||||
}
|
||||
|
||||
footer {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
Loading…
Reference in New Issue
Block a user