Skip to content

Commit 2b63d72

Browse files
committed
fix: Remove underline from trailing whitespace in external links
Removes the non-breaking space that caused underlines to appear below trailing whitespace between external icon and link text. Replaces it with margin-inline-start. AWSUI-60840
1 parent 5730732 commit 2b63d72

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/link/internal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ const InternalLink = React.forwardRef(
186186
{children}
187187
{external && (
188188
<span className={styles['icon-wrapper']}>
189-
&nbsp;
190189
<span
191190
className={styles.icon}
192191
aria-label={renderedExternalIconAriaLabel}

src/link/styles.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858

5959
.icon-wrapper {
6060
white-space: nowrap;
61+
/* Add non-breaking space for consistent spacing */
62+
&::before {
63+
content: '\a0';
64+
display: inline-block;
65+
}
6166
}
6267

6368
.icon {

0 commit comments

Comments
 (0)