DevTools/CSSTips: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 30: Line 30:
== Performance ==
== Performance ==


* Use an iframe where possible so your rules are scoped to the a smaller set of nodes
* Read [https://developer.mozilla.org/en/CSS/Writing_Efficient_CSS Writing Efficient CSS]
* Read "Writing Efficient CSS": https://developer.mozilla.org/en/CSS/Writing_Efficient_CSS
* Use an iframe where possible so your rules are scoped to the smallest possible set of nodes
* Descendent selector should be avoided
* If your CSS is used in browser.xul, you need to take special care to performance:
** Descendent selector should be avoided
** If possible find ways to use '''only''' id selectors, class selectors and selector groups


== The Mozilla Environment ==
== The Mozilla Environment ==
Line 55: Line 57:
== Localization ==
== Localization ==


* Code must be test in RTL. Use the [https://addons.mozilla.org/en-US/firefox/addon/force-rtl/ Force RTL extension]
* Code must be tested in RTL mode. Use the [https://addons.mozilla.org/en-US/firefox/addon/force-rtl/ Force RTL extension]
** ... or you can go to about:config and set <tt>intl.uidirection.en</tt> to rtl.
** ... or you can go to about:config and set <tt>intl.uidirection.en</tt> to rtl.
* For RTL compatibility, for margins, padding and borders, don't use <tt>*-left</tt> or <tt>*-right</tt> but <tt>*-start</tt> and <tt>*-end</tt>)
* For RTL compatibility, for margins, padding and borders, don't use <tt>*-left</tt> or <tt>*-right</tt> but <tt>*-start</tt> and <tt>*-end</tt>)
Confirmed users
295

edits

Navigation menu