mozilla

Revision 236255 of Template:CSSDataTypes

  • Revision slug: Template:CSSDataTypes
  • Revision title: Template:CSSDataTypes
  • Revision id: 236255
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment

Revision Content

<% // Lists all the CSS data types, seperated by a comma // Warning: special case for color (hardcoded) // Non documented ones are not listed var data_types = ['angle', 'color', 'frequency', 'gradient', 'identifier', 'image', 'integer', 'length', 'number', 'percentage', 'ratio', 'resolution', 'shape', 'string', 'time', 'timing-function', 'uri']; var notfirst = false; var list_type; foreach(var data_type in data_types) { if (notfirst) { list_type += ', '; } notfirst = true; if (data_type != 'color') { list_type += ''; } else { list_type += ''; } } %> <%- list_type -%>

Revision Source

<%
// Lists all the CSS data types, seperated by a comma
// Warning: special case for color (hardcoded)
// Non documented ones are not listed

var data_types = ['angle', 'color', 'frequency', 'gradient', 'identifier', 'image', 'integer', 'length', 'number', 'percentage', 'ratio', 'resolution', 'shape', 'string', 'time', 'timing-function', 'uri'];
var notfirst = false;

var list_type;

foreach(var data_type in data_types) {
    if (notfirst) {
      list_type += ', ';
    }
    notfirst = true;
    if (data_type != 'color') {
      list_type += '<code><a href="' + env.locale + "/CSS/" + data_type + '"&lt;' + data_type + '&gt;</a></code>';
    }
    else {
      list_type += '<code><a href="' + env.locale + "/CSS/color_value"&lt;color&gt;</a></code>';
    }
}
%>
<%- list_type -%>
Revert to this revision