Skip to content

Commit f98ad11

Browse files
committed
add some description of the dir mixin
1 parent 624189a commit f98ad11

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

lib/mixins/dir-mixin.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,19 @@
4343
}
4444

4545
/**
46-
* Some stuff about :dir
46+
* Element class mixin that allows elements to use the `:dir` CSS Selector to have
47+
* text direction specific styling.
48+
*
49+
* With this mixin, any stylesheet provided in the template will be transform `:dir` into
50+
* `:host([dir])` and sync direction with the page via the element's `dir` attribute.
51+
*
52+
* Elements can opt out of the global page text direction by setting the `dir` attribute
53+
* directly in `ready()`.
54+
*
55+
* Caveats:
56+
* - Automatic left-to-right or right-to-left styling is sync'd with the `<html>` element
57+
* - Applications must set `<html dir="ltr">` or `<html dir="rtl">` to sync direction
58+
* - Opting out of the global direction styling is permanent
4759
*
4860
* @mixinFunction
4961
* @polymer

0 commit comments

Comments
 (0)