Firefox/CSS Tips: Difference between revisions

Add link to up-to-date documentation on MDN
(Added tip.)
(Add link to up-to-date documentation on MDN)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
This page contains information about CSS used in the Firefox front end.
This page contains information about CSS used in the Firefox front end.
<div style="margin: 1em 0px; border: 2px solid orange; padding: 1em; background-color: #FFC; text-align: center;">'''<p>More detailed and up-to-date documentation is available on MDN at:</p><p>[https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/CSS_Guidelines The Firefox codebase: CSS Guidelines]</p>'''</div>


== Basics ==
== Basics ==
Line 92: Line 94:
Text Direction:
Text Direction:
* For margins, padding and borders, use start/end rather than left/right
* For margins, padding and borders, use start/end rather than left/right
** Example: Use <tt>-moz-margin-start: 3px;</tt> not <tt>margin-left: 3px</tt>
** Example: Use <tt>margin-inline-start: 3px;</tt> not <tt>margin-left: 3px</tt>
** Tip: whenever you specify an <tt>unbalanced</tt> margin, padding or border style (i.e. the value for left is different from the value for right), think of using -end/ -start
** Tip: whenever you specify an <tt>unbalanced</tt> margin, padding or border style (i.e. the value for left is different from the value for right), think of using -end/ -start
* When there is no special RTL-aware property (eg. float: left|right) available, use the pseudo :-moz-locale-dir(ltr|rtl)  
* When there is no special RTL-aware property (eg. float: left|right) available, use the pseudo :-moz-locale-dir(ltr|rtl)  
Confirmed users
183

edits