W3C home > Mailing lists > Public > www-style@w3.org > November 2008

Re: XML-based CSS

From: Jethro Larson <jethrolarson@gmail.com>
Date: Fri, 14 Nov 2008 18:45:46 +0000
Message-ID: <a9b1b1f20811141045k12e05578g2cc3d3f4e31095d1@mail.gmail.com>
To: www-style@w3.org
I wouldn't be a fan of xml syntax for css but maybe JSON or YAML.

It could look something like this:
<link rel="stylesheet" type="text/yaml" href="style.yaml">
- body :
      background: #fff
      border:
         width: 1px
         style: solid
      text-align: center
      font: {weight: normal, size: 12px, family: "Arial, sans-serif"}
- a : {text-decoration: none}
- ".myclass": {color: #bbb}

I personally like YAML as it is easier to read than XML, offers a couple
different ways to write it, and it's pretty easy to translate into JSON or
XML.

Honestly, if CSS adapted a more regimented syntax it might make the future
development of CSS easier.
Received on Wednesday, 26 November 2008 13:14:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:17 GMT