-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fixes #34855 RangeControl style issue in RTL #35777
Fixes #34855 RangeControl style issue in RTL #35777
Conversation
@@ -192,7 +192,7 @@ export const ThumbWrapper = styled.span` | |||
transform: translateX( 4.5px ); | |||
|
|||
${ thumbColor }; | |||
${ rtl( { marginLeft: -10 } ) }; | |||
${ rtl( { marginLeft: -10 }, { marginRight: 1 } ) }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it makes sense that a symmetrical element like this requires asymmetrical margins. In fact the translateX( 4.5px )
a few lines above stands out to me as something that is not being RTL'ed yet. That might also fix the tooltip, which still isn't perfectly aligned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, have we tried something like this yet? The reason I would prefer a symmetric solution if possible is that it's easier to fix when an underlying size value changes. Less guess work and manual tweaking involved.
- transform: translateX( 4.5px );
${ thumbColor };
- ${ rtl( { marginLeft: -10 }, { marginRight: 1 } ) };
+ ${ rtl( { marginLeft: -10 } ) };
+ ${ rtl(
+ { transform: 'translateX( 4.5px )' },
+ { transform: 'translateX( -4.5px )' }
+ ) };
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you for fixing!
* Fixes #34855 RangeControl style issue in RTL * addjest the dot offset so it lines up with tool tip * swapped to using translateX for the adjustment
Description
Fixes #34855 RangeControl style issue in RTL
How has this been tested?
Switch RTL lag (hebrew)
load the space block
check the
Screenshots
Types of changes
Adjusted style for RTL
Checklist:
*.native.js
files for terms that need renaming or removal).