Template:CSSDataTypes

  • Revision slug: Template:CSSDataTypes
  • Revision title: Template:CSSDataTypes
  • Revision id: 236272
  • 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 list_type; // result var data_types = ['angle', 'color', 'frequency', 'gradient', 'identifier', 'image', 'integer', 'length', 'number', 'percentage', 'ratio', 'resolution', 'shape', 'string', 'time', 'timing-function', 'uri']; var not_first = false; var locale = env.locale; function add_data_type(data_type) { if (not_first) { list_type += ', '; } not_first = true; list_type += ''; } data_types.forEach( add_data_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 list_type; // result

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

var locale = env.locale;

function add_data_type(data_type) {
    if (not_first) {
        list_type += ', ';
    }
    not_first = true;
    list_type += '<code><a href="' + locale + '/CSS/';
    if (data_type != 'color') {
         list_type += data_type;
    }
    else {
        list_type += 'color_value';
    }
    list_type += '"&lt;' + data_type + '&gt;</a></code>';
}

data_types.forEach( add_data_type );
%>
<%- list_type %>
Revert to this revision