Template:CSSDataTypes

  • Revision slug: Template:CSSDataTypes
  • Revision title: Template:CSSDataTypes
  • Revision id: 62753
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment 17 words added, 4 words removed

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', 'identifier', 'integer', 'length', 'number', 'percentage', 'resolution', 'shape', 'string', 'time', 'uri']; var notfirst = false; foreach(var data_type in data_types) { if (notfirst) { notfirst = true; web.text(', '); } (web.link(wiki.uri(lang + '/CSS/' + data_type), '<' + data_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 */

/* 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', 'identifier', 'integer', 'length', 'number', 'percentage', 'resolution', 'shape', 'string', 'time', 'uri'];
var notfirst = false;

foreach(var data_type in data_types) {
    if (notfirst) {
      notfirst = true;
      web.text(', ');
    }
    <code>(web.link(wiki.uri(lang + '/CSS/' + data_type), '<' + data_type + '>'))</code>; 
}
</pre>
Revert to this revision