caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Dario Teixeira <darioteixeira@yahoo.com>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] [ANN] CCSS 1.0
Date: Thu, 11 Mar 2010 05:34:36 -0800 (PST)	[thread overview]
Message-ID: <594748.67259.qm@web111501.mail.gq1.yahoo.com> (raw)
In-Reply-To: <91a3da521003101309n5eadf89dt7e6e157e3dd14a3@mail.gmail.com>

Hi,

> Unit aware is good but the classes should be broader. I find it
> disappointing that it won't allow you to add mm to cm correctly, since
> it's supposed to be unit aware.

It's unit-aware in the sense that it knows that numeric values may have
this thing called "units" attached, and they impose some constraints on
arithmetic, but it knows nothing about the semantics and relation between
units.

I understand why you may see this as a bug, but for me it's a feature.
Personal experience tells me that mixing units -- even if they belong
to the same system, as cm and mm -- is asking for trouble (never mind
mixing units from metric and imperial -- ask NASA).

While CCSS has no intention of being a CSS-lint, it does enforce a couple
of good-practices constraints.  Forbidding unit mixing is one of them;
another is ensuring each property declaration is terminated by a semicolon,
even if it's the last one: again, experience tells me that omitting it
is asking for trouble.

 
> From a user perspective, it makes it much easier to copy paste
> snippets from here and there without having to bother to normalize
> every length to a single unit.

That will be a good point if CCSS ever becomes popular and you wish
to copy'n'paste CSS fragments augmented with its syntax.  But presently
that's a moot point, since the CSS fragments you find in the wild are not
augmented with variable declarations and/or arithmetic.

But anyway, if you really think unit conversion is a must-have feature,
I can add it to the next release (it's actually simple to implement).
However, personally I remain sceptical about its real-world usefulness.

Best regards,
Dario Teixeira






  reply	other threads:[~2010-03-11 13:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-10 19:16 Dario Teixeira
2010-03-10 21:09 ` [Caml-list] " Daniel Bünzli
2010-03-11 13:34   ` Dario Teixeira [this message]
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=594748.67259.qm@web111501.mail.gq1.yahoo.com \
    --to=darioteixeira@yahoo.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=daniel.buenzli@erratique.ch \
    /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).