Template:CSSDataTypes

  • Revision slug: Template:CSSDataTypes
  • Revision title: Template:CSSDataTypes
  • Revision id: 62750
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment 1 words added, 1 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 first = true; foreach(var data_type in data_types) { if (first) { first = false; web.text(', '); } (web.text('<' + 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 first = true;

foreach(var data_type in data_types) {
    if (first) {
      first = false;
      web.text(', ');
    } 
    <code>(web.text('<' + data_type + '>'<))</code>; 
}
</pre>
Revert to this revision