W3C home > Mailing lists > Public > www-style@w3.org > December 2005

Re: I Updated that CSS Formatter Page (Feedback Please)

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Wed, 14 Dec 2005 00:28:45 +1100
Message-ID: <439ECC8D.3050108@lachy.id.au>
To: Lonnie Best <w3@startport.com>
CC: www-style@w3.org

Lonnie Best wrote:
> I recently made a page that allows you to format your CSS by simply pasting
> it into this box:
> http://www.lonniebest.com/FormatCSS/
> As a result of your *much appreciated* feedback, I have added an options
> menu to accommodate the varying preferences that people have mentioned.

Now that the alphabetising can be disabled, it may possibly be a useful 
tool.  One bug I found is that if there is a space between the value and 
semi-colon, the entire property is removed.


foo { color: green ; }

Look up the CSS test suite and find the tests that specifically test 
parsing, run them through your parser and make sure the results are as 
expected.  I suspect you may find quite a few other bugs.

Other useful feature ideas:
* Allow user to specify the number of spaces/tabs to insert.  Some 
people may like 1 tab, while others may prefer 2 spaces, 4 spaces or 
anything else.
* Leave the alphabetising features unchecked by default.
* Add an option to make lines wrap between properties, after a specified 
number of characters.  i.e. I like to format my CSS like this:

foo bar baz { property-one: value; property-two: value;
               property-three: value; property-four: value; }

Lachlan Hunt
Received on Tuesday, 13 December 2005 13:29:02 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:22 UTC