We would like to render an anchor with display: inline (like the default for <a>) so that it wraps properly when embedded in a block of text. If we do so, we see an underlined space at the end of our anchor text.
The template for the FAST anchor includes whitespace between the closing tag of the default slot and the closing tag of the enclosing <a> element. This collapses to a single space when rendered, but when styled with an underline (typical for an anchor) and the inline display mode, the space is visibly underlined.
π» Repro or Code Sample
Go to the Anchor component in the FAST component explorer.
Set Appearance to hypertext
Use the browser dev tools to edit the html:
a. add text before and after the <fast-anchor> element
b. set display: inline on the <fast-anchor> element
π€ Expected Behavior
Underline should end at the last character of the anchor text.
π― Current Behavior
The space after the anchor text is underlined.
π Possible Solution
Remove all formatting whitespace after the default slot in the Anchor template.
π¦ Context
We are creating a design system including the anchor component, and we want to style it so that it can be embedded within a block of text and wraps properly (requires setting display: inline).
π Bug Report
We would like to render an anchor with
display: inline
(like the default for<a>
) so that it wraps properly when embedded in a block of text. If we do so, we see an underlined space at the end of our anchor text.The template for the FAST anchor includes whitespace between the closing tag of the default slot and the closing tag of the enclosing
<a>
element. This collapses to a single space when rendered, but when styled with an underline (typical for an anchor) and theinline
display mode, the space is visibly underlined.π» Repro or Code Sample
<fast-anchor>
element b. setdisplay: inline
on the<fast-anchor
> elementπ€ Expected Behavior
Underline should end at the last character of the anchor text.
π― Current Behavior
The space after the anchor text is underlined.
π Possible Solution
Remove all formatting whitespace after the default slot in the Anchor template.
π¦ Context
We are creating a design system including the anchor component, and we want to style it so that it can be embedded within a block of text and wraps properly (requires setting
display: inline
).