JDK-8102057 : Add CSS support for the directionality pseudo-class :dir()
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2012-09-26
  • Updated: 2015-06-16
  • Resolved: 2013-02-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Relates :  
Description
http://dev.w3.org/csswg/selectors4/#the-dir-pseudo 

Allow selectors to consider UA directionality. 

.foo:dir(rtl) { -fx-fill: red; } 

 One or more of Application, Stage, or Scene would have the value.
Comments
http://hg.openjdk.java.net/openjfx/8/controls/rt/rev/74802b5965e1 Unit Tests: javafx-ui-common/test/unit/javafx/scene/Node_effectiveOrientation_Css_Test/test_SimpleSelector_dir_pseudoClass_with_scene_effective_orientation_ltr javafx-ui-common/test/unit/javafx/scene/Node_effectiveOrientation_Css_Test/test_SimpleSelector_dir_pseudoClass_with_scene_effective_orientation_rt javafx-ui-common/test/unit/javafx/scene/Node_effectiveOrientation_Css_Test/test_CompounSelector_dir_pseudoClass_on_parent_with_scene_effective_orientation_ltr javafx-ui-common/test/unit/javafx/scene/Node_effectiveOrientation_Css_Test/test_CompoundSelector_dir_pseudoClass_on_parent_with_scene_effective_orientation_rtl javafx-ui-common/test/unit/javafx/scene/Node_effectiveOrientation_Css_Test/test_CompounSelector_dir_pseudoClass_on_child_with_scene_effective_orientation_ltr javafx-ui-common/test/unit/javafx/scene/Node_effectiveOrientation_Css_Test/test_CompoundSelector_dir_pseudoClass_on_child_with_scene_effective_orientation_rtl javafx-ui-common/test/unit/javafx/scene/Node_effectiveOrientation_Css_Test/test_dir_pseudoClass_functions_on_scene_effective_orientation_not_node
01-02-2013

The spec says "The :dir() pseudo-class does not select based on stylistic states���for example, the CSS ���direction��� property does not affect whether it matches." This means that in .foo:dir(rtl) { direction: ltr; }, any "foo" would have the direction ltr in a rtl world. This does not mean that a node with node orientation rtl matches this selector. Whether the selector applies or not does not depend on the node's effective node orientation. Rather, whether or not the selector applies depends on the effective orientation of the Scene.
01-02-2013