Revision 62758 of Template:CSSDataTypes

  • Revision slug: Template:CSSDataTypes
  • Revision title: Template:CSSDataTypes
  • Revision id: 62758
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment 6 words added
Tags: 

Revision Content

<% /* Lists all the CSS data types, seperated by a comma */ /* Warning: special case for color (hardcoded) */ /* Non documented ones are not listed */ /* Calculate lang */ var u = Uri.Parts(Page.uri); var lang = string.toLower(u.path[0]); if(string.Contains(lang, "project")) {   lang = string.Substr(lang, 8); } else if (string.StartsWith(lang, "user:")) {   lang = page.language; } var data_types = ['angle', 'color', 'frequency', 'gradient', 'identifier', 'image', 'integer', 'length', 'number', 'percentage', 'ratio', 'resolution', 'shape', 'string', 'time', 'timing-function', 'uri']; var notfirst = false; foreach(var data_type in data_types) { if (notfirst) { web.text(', '); } notfirst = true; if (data_type != 'color') { (web.link(wiki.uri(lang + '/CSS/' + data_type), '<' + data_type + '>')); } else { (web.link(wiki.uri(lang + '/CSS/color_value'), '')); } }

Revision Source

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

/* Calculate lang */
var u = Uri.Parts(Page.uri);
var lang = string.toLower(u.path[0]);
if(string.Contains(lang, "project")) {
  lang = string.Substr(lang, 8);
} else if (string.StartsWith(lang, "user:")) {
  lang = page.language;
} 

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

foreach(var data_type in data_types) {
    if (notfirst) {
      web.text(', ');
    }
    notfirst = true;
    if (data_type != 'color') {
      <code>(web.link(wiki.uri(lang + '/CSS/' + data_type), '<' + data_type + '>'))</code>;
    }
    else {
      <code>(web.link(wiki.uri(lang + '/CSS/color_value'), '<color>'))</code>;
    }
}
</pre>