Firefox/Windows 8 Metro Style Guides: Difference between revisions

Jump to navigation Jump to search
 
Line 43: Line 43:


== XUL / XML ==
== XUL / XML ==
* one attribute per line
* One attribute per line, aligning with the first character of the first one
* open & closing tags should go on separate lines
* If there is an id attribute, that should be the first attribute listed
* Children are indented 2 spaces
* Treat strings enclosed as children
** In example below, &clearPrivateData.done is an enclosed string where as &clearPrivateData.button is a label, which is an attribute
* If separate open & closing tags,  tags should go on separate lines
* No soft tabs (\t characters)
* Try to keep the 80 character limit
** (and if not, try really hard to keep it below a 100)
** If your oncommand, command, or onclick code is too long, please really consider putting it in a function
* Example
<pre>
<hbox align="center">
  <button id="prefs-clear-data"
          label="&clearPrivateData.button;"
          command="cmd_sanitize"
          flex="1" />
  <spacer id="clear-notification-empty"/>
  <cssthrobber id="clearprivacythrobber">
  </cssthrobber>
  <description id="clear-notification-done">
    &clearPrivateData.done;
  </description>
</hbox>
 
</pre>


= helpful references =
= helpful references =
Confirmed users
45

edits

Navigation menu