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

:root[dir="rtl"] does not work with shimed CSS properties #3902

Closed
dfreedm opened this issue Sep 6, 2016 · 4 comments
Closed

:root[dir="rtl"] does not work with shimed CSS properties #3902

dfreedm opened this issue Sep 6, 2016 · 4 comments

Comments

@dfreedm
Copy link
Member

dfreedm commented Sep 6, 2016

Description

Live Demo

With useNativeCSSProperties
http://jsbin.com/zoloru/edit?html,output

Without:
http://jsbin.com/qezehez/edit?html,output

@eeid26
Copy link

eeid26 commented Sep 7, 2016

Actually there is another annoying bug that makes supporting rtl in polymer not as easy as it should be.
(I already reported the bug before and it was marked as a duplicate and it wasn't really.)

a rule like
:host([some-attribute]):host-context([dir='rtl'])
works in shadow dom and it does not work in shady dom.

Example showing the bug using a modified version of your Example:
with shadow dom (Works)
http://jsbin.com/dutihahuye/edit?html,output

with shady dom (Does not work)
http://jsbin.com/hemopediyi/edit?html,output

@helenxywu
Copy link

@eeid26 Have you tried the workaround here webcomponents/webcomponentsjs#16?

@eeid26
Copy link

eeid26 commented Sep 7, 2016

Thank you @helenxywu
Yes I tried it before and I tried it now and it did not work for me. Even the example in the link did not work for me.

@helenxywu
Copy link

yea you're right I'm filing another bug for that. #3904

@tjsavage tjsavage added the 1.x label Sep 8, 2016
dfreedm added a commit that referenced this issue Sep 13, 2016
Selectors like `:root[dir="rtl"]` and `html.foo` are now supported

Support `html` selector for `custom-style`

Fixes #3902
Fixes #3924
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants