Template:CSSDataTypes

  • Revision slug: Template:CSSDataTypes
  • Revision title: Template:CSSDataTypes
  • Revision id: 236258
  • 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; data_types.foreach(function (data_type) { 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;

data_types.foreach(function (data_type) {
    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