-
Notifications
You must be signed in to change notification settings - Fork 756
Closed
Labels
Description
Suppose I have a custom element called x-toggle, which has two states on and off reflected by two CSS classes on and off, respectively.
First I want to style the element based its states. This is simple as follows
:host(.on) { ... }
:host(.off) { ... }Next, I want to support RTL layout. The attribute dir=rtl can be specified on x-foo itself or one of its ancestors.
dir=rtlis onx-foo
:host([dir=rtl].on) { ... }
:host([dir=rtl].off) { ... }dir=rtlis on an ancestor. Currently, there's no way I can create the following selectors withinx-foo's style tag. Will this problem be solved?
[dir=rtl] x-toggle.on { ... }
[dir=rtl] x-toggle.off { ... }References: