Skip to content

Loading…

Element picker seems to inherit some style rules (not RTL languages friendly) #266

Closed
Mikey1993 opened this Issue · 7 comments

2 participants

@Mikey1993

Element picker seems to behave wrongly when using Hebrew (RTL language) Chrome version.

Scenario 1:

On RTL/Hebrew pages, such as Google.co.il, Element picker shows the "Cosmetic filters Click, Ctrl-click" text (seems like it needs only a right margin of 1em without the left margin to look as it should), and the rules that follow not right.

Pic:
https://i.imgur.com/HSWpWFD.png

Scenario 2:

On LTR/English pages, such as edition.cnn.com, Element picker shows only the "Cosmetic filters Click, Ctrl-click" text not right (the rules start with hashtag properly).

Pic:
https://i.imgur.com/LpLOWIF.png

@Mikey1993 Mikey1993 changed the title from Element picker seems to inherit some page style rules (not RTL languages friendly) to Element picker seems to inherit some style rules (not RTL languages friendly)
@Mikey1993

When repeating the first scenario when having the browser set to English (Instead of Hebrew), it behaves the same, which probably means that the Element Picker inherits some CSS rules from the page, and not the chrome user based language.

@gorhill

Working on it. Good point about the page, make sense.

@gorhill

I think I've got it right, if you can confirm (I checked that all is fine as before for LTR languages). Using the same examples you posted:

a

b

Edit: Actually, I've moved the buttons back to the right side, given that the textarea is always LTR.

@Mikey1993

IMO, the buttons on the textarea should always be on the right side, at the same order for all languages (from LTR): Create, Pick, Quit

I also think that it's better, if the "Cosmetic filters Click, Ctrl-click" (and all the headers) would be displayed as it should, but from LTR (Like in Scenario 1, but with a right padding, instead of the left one)
+
the rules should be always from LTR (because the id's, classes, URIs and etc will always be in English)

All in all, I think the page needs to be LTR, but should only display the translated text without any position change.

What do you think?

@gorhill

Ok, corrected as suggested:

a

b

@Mikey1993

This is almost perfect!
I also think that the buttons should just do shift right by 1 place so that the Orange button (Create), would be the most left in the pack :)

@gorhill

Orange button (Create), would be the most left in the pack

Ok done, so I will check in the fix. Thanks for the help.

@gorhill gorhill added a commit that closed this issue
@gorhill gorhill this fixes #266 e268dff
@gorhill gorhill closed this in e268dff
@AlexVallat AlexVallat pushed a commit to AlexVallat/uBlock that referenced this issue
@gorhill gorhill to address #266 -- drafty, just curious to see if this helps b084d79
@AlexVallat AlexVallat pushed a commit to AlexVallat/uBlock that referenced this issue
@gorhill gorhill this should fix #266 + fixes #212 6470216
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.