fix(menu): use text-align: start so items follow RTL - #4048
Open
raydapay wants to merge 1 commit into
Open
Conversation
The menu list item alignment was hard-coded to text-align: left, the last physical holdout in a component otherwise migrated to logical properties (the nested list already uses border-inline-start / padding-inline-start). text-align: start is identical to left in LTR and follows dir=rtl. Fixes jgthms#4029
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4029.
The menu is already mostly migrated to logical properties — the nested list uses
border-inline-start/padding-inline-start. The one physical holdout is item alignment insass/components/menu.scss:This forces left alignment regardless of writing direction. Switching to
text-align: start:leftin LTR, so it's identical there (non-breaking);rightunderdir="rtl", so items align with the writing direction automatically — matching the rest of the component.Verified on a
.menuin both directions: items hug the left in LTR and the right in RTL, with nothing else changed.While here, I noticed
.field-label(sass/form/tools.scss) and tableth(sass/elements/table.scss) have the same physicaltext-align— happy to fix those too if you'd like, here or in a follow-up.