Confirmed users
31
edits
No edit summary |
(Adding guidelines for RTL/LTR/bidi) |
||
Line 117: | Line 117: | ||
color: #00ff00 /* HEX color - defined using the 6-character dash notation */ | color: #00ff00 /* HEX color - defined using the 6-character dash notation */ | ||
color: rgba( 34, 12, 64, 0.3); /* rgba(R,G,B,a) - using only for transparent colors */ | color: rgba( 34, 12, 64, 0.3); /* rgba(R,G,B,a) - using only for transparent colors */ | ||
} | |||
</pre> | |||
==Direction (RTL/LTR and Bidi)== | |||
Rules that are direction-specific (e.g LTR) should have the same specificity as their RTL counterparts. Rules with an implicit direction should be made explicit using either the dir attribute selector (html[dir="ltr|rtl"]), or the :-moz-dir(rtl) pseudo-class. RTL and LTR -specific rules should always be grouped together in the same stylesheet to simplify maintenance. | |||
<pre> | |||
html[dir="ltr"] .foo { | |||
left: 0; | |||
} | |||
html[dir="rtl"] .foo { | |||
right: 0; | |||
} | } | ||
</pre> | </pre> |