Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Adjust Link's underline width #806

Closed
simurai opened this issue Oct 31, 2024 · 0 comments · Fixed by #809
Closed

[Suggestion] Adjust Link's underline width #806

simurai opened this issue Oct 31, 2024 · 0 comments · Fixed by #809

Comments

@simurai
Copy link
Contributor

simurai commented Oct 31, 2024

Problem

This came up in QA. Currently, the width of a Link's underline is calculated like:

width: calc(100% - 1.5em);

The - 1.5em is probably meant as "padding" for the arrow icon. But since the icon uses pixels (16px) and also the margin uses pixels (4px), it might not always match the - 1.5em that can depend on a parent's font-size.

On https://github.com/home's case the underline is a bit shorter than the text:

Image

Suggestion

Use px for the underline's "padding":

- width: calc(100% - 1.5em);
+ width: calc(100% - 20px);

Image


Or an alternative could be (not sure if possible) to move the underline to the <span> element that contains the text. Then the width could just be width: 100% and the icon doesn't need to be taken into account.

Image

Urgency

Not urgent. We'll add a separate override in the meantime.

@simurai simurai changed the title [Suggestion] Adjust Link underline [Suggestion] Adjust Link's underline width Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant