Template:CSSDataTypes

  • Revision slug: Template:CSSDataTypes
  • Revision title: Template:CSSDataTypes
  • Revision id: 236261
  • 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; 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;
                        list_type += '<code><a href="' + env.locale + '/CSS/';
                        if (data_type != 'color') {
                             list_type += data_type;
                        }
                        else {
                            list_type += 'color_value';
                        }
                        list_type += '"&lt;' + data_type + '&gt;</a></code>';
                    });
%>
<%- list_type -%>
Revert to this revision