fix(Sass): route the last two direction overrides through ltr-rtl() - #683
Merged
Conversation
Both were written as bare [dir="rtl"] rules, so they ignored the flags that now decide what a build contains: an LTR-only build still carried them, and the mixin is the only place that knows an RTL-only build wants the mirrored value as its base. The submenu chevron was already a mixin call away; the translate-middle override arrived one PR too early to use it.
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.
Follow-up to #675 and #682, which crossed each other.
Two direction overrides were written as bare
[dir="rtl"]rules instead ofltr-rtl()calls, so they ignored$enable-ltr/$enable-rtl:.translate-middle/.translate-middle-x— added in feat(forms): add the form-control-group primitive and move every field component onto it #675, before refactor(Sass)!: one stylesheet for both directions, drop the RTL build #682 made the mixin the single mechanism._menu.scss— predates both.An LTR-only build (
$enable-rtl: false) still shipped them, and an RTL-only build ($enable-ltr: false) could not get the mirrored value as its base, which is the whole point of that mode.Verified: default build unchanged (both overrides still emitted),
$enable-rtl: falsenow drops them (grep -c 'dir=rtl] .translate-middle'goes 2 → 0, submenu 1 → 0). Sass suite 43/43, class API guard, stylelint.