caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dario Teixeira <darioteixeira@yahoo.com>
To: caml-list@yquem.inria.fr
Subject: [ANN] CCSS 1.0
Date: Wed, 10 Mar 2010 11:16:41 -0800 (PST)	[thread overview]
Message-ID: <178425.29275.qm@web111506.mail.gq1.yahoo.com> (raw)

Hi,

CCSS is a preprocessor for CSS (Cascading Style Sheets), extending the
language with arithmetic operations and variables.  It was born out of
frustration with the unbearable slowness and lack of support for some
CSS3 constructs in other similar tools such as LESS [1].  Here are
some points to be aware:

 - The CSS source is actually parsed into an AST, which is then converted
   again into a CSS textual representation for output.  You can therefore
   use it as a pretty-printer.  On the downside, comments are stripped out.

 - Because it is an actual parser, it is fairly straightforward to hack
   your own custom transformations to the AST.  The scanner is Ulex-based,
   whereas Menhir is required for building the parser.

 - CCSS knows only of CSS syntax, and has no knowledge of actual CSS
   properties and valid values for each.  This simplifies the program
   and makes it future-compatible, but also means that will gleefully
   accept nonsensical CSS properties such as the following:

   h1 {foo: bar;}

 - The scanner/parser does not cover some of the hairy corners of CSS.
   It does however handle new syntactic constructs introduced with CSS3.

 - The arithmetic operations are unit-aware, and will complain if you
   try adding apples and oranges, for example.


Examples of use and the syntax for the language extensions are described
in the project's homepage, which also includes building instructions and
download links [2].  Note that the source-code is released under the terms
of the GNU GPL v2.

Last, but not least, though no particular attention was given to performance,
it does fulfill the initial goal of making execution time as close to zero
as not to get in the way...

Hope you find it useful -- feedback is welcome!

Best regards,
Dario Teixeira


[1] http://lesscss.org/index.html
[2] http://ccss.forge.ocamlcore.org/






             reply	other threads:[~2010-03-10 19:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 19:16 Dario Teixeira [this message]
2010-03-10 21:09 ` [Caml-list] " Daniel Bünzli
2010-03-11 13:34   ` Dario Teixeira
2010-03-11 14:54     ` Daniel Bünzli
2010-03-11 19:00       ` Dario Teixeira
2010-03-12 13:10         ` Daniel Bünzli
2010-03-12 15:43           ` Dario Teixeira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178425.29275.qm@web111506.mail.gq1.yahoo.com \
    --to=darioteixeira@yahoo.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).