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

enhance(layout): add margin for "(en-US)" indicator #12204

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

leon-win
Copy link
Member

Summary

This PR adds margin for "(en-US)" indicator to improve visual perception.
Also the .only-in-en-us span CSS class was removed because it is no longer used (as far as I understand).

Relates: #11052

Problem

Now "(en-US)" indicator "sticks" to link text. This applies to all locales except zh-CN and zh-TW (because in Chinese the bracket symbol already includes an extra space and it looks harmonious).

Solution

This PR adds margin-left: 0.5ch; to "(en-US)" indicator in de, es, fr, ja, ko, ru and pt-BR locale.

Alternative method: add an indent to the main html a.only-in-en-us:after class and make exceptions for zh-CN and zh-TW.


Screenshots

Locale Before After
es image image
fr image image
ja image image
ko image image
ru image image
pt-BR image image

@leon-win leon-win requested a review from a team as a code owner November 28, 2024 22:03
client/src/document/index.scss Outdated Show resolved Hide resolved
@caugner caugner changed the title fix(font): add margin for "(en-US)" indicator fix(layout): add margin for "(en-US)" indicator Nov 29, 2024
Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@caugner caugner merged commit 450e433 into mdn:main Nov 29, 2024
13 checks passed
@caugner caugner changed the title fix(layout): add margin for "(en-US)" indicator enhance(layout): add margin for "(en-US)" indicator Nov 29, 2024
@leon-win leon-win deleted the fix/font-add-margin-for-en-us-indicator branch November 29, 2024 12:55
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 this pull request may close these issues.

2 participants