Skip to content

Commit 9dfef5c

Browse files
committed
💄style: fix external link icon breaking word wrapping
1 parent e11186a commit 9dfef5c

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

sass/parts/_misc.scss

+5-14
Original file line numberDiff line numberDiff line change
@@ -85,30 +85,21 @@ a {
8585
// External link styles with `external_links_class = "external"`.
8686
main {
8787
--external-link-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Cpath d='M11 5h-6v14h14v-6'/%3E%3Cpath d='M13 11l7 -7'/%3E%3Cpath d='M21 3h-6M21 3v6'/%3E%3C/g%3E%3C/svg%3E");
88-
a.external:not(:has(img, svg, video, picture, figure)) {
89-
display: inline-block;
90-
padding-inline-end: 0.9em;
91-
}
9288

9389
a.external:not(:has(img, svg, video, picture, figure))::after {
94-
-webkit-mask-image: var(--external-link-icon);
95-
-webkit-mask-size: 100% 100%;
9690
display: inline-block;
97-
position: absolute;
98-
top: 50%;
99-
transform: translateY(-50%);
100-
mask-image: var(--external-link-icon);
101-
mask-size: 100% 100%;
102-
margin-inline-start: 0.2em;
103-
inset-inline-end: 0;
91+
vertical-align: -0.05em;
92+
margin-inline-start: 0.1em;
10493
background-color: currentColor;
10594
width: 0.8em;
10695
height: 0.8em;
10796
content: '';
97+
-webkit-mask-image: var(--external-link-icon);
98+
-webkit-mask-size: 100% 100%;
10899
}
109100

110101
&:dir(rtl) a.external:not(:has(img, svg, video, picture, figure))::after {
111-
transform: translateY(-50%) rotate(-90deg);
102+
transform: rotate(-90deg);
112103
}
113104

114105
.meta a.external:not(:has(img, svg, video, picture, figure))::after {

0 commit comments

Comments
 (0)