W3C home > Mailing lists > Public > www-style@w3.org > February 2014

Re: [css-shapes] Animating <basic-shape>s updated

From: Bear Travis <betravis@adobe.com>
Date: Wed, 5 Feb 2014 21:43:56 +0000
To: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <CF17EAEF.28AFE%betravis@adobe.com>
Hi All,

Thought I would chime in with my two cents.

>Actually, it's not clear what happens with
>   bottom calc(30%+20px) right calc(30%+20px)
>I.e. I could interpret that sentence as wanting either
>   calc(70%-20px) calc(70%-20px)
>   bottom calc(30%+20px) right calc(30%+20px)
>It should be clear that we'd end up as the first.

I would argue that positions should be treated as a length + percentage
offset from top/left for serialization, the same way they are for computed
values. This at least gives a single model of what you are serializing.

Also, I don't think the style system should unwrap calc values, as the
above example could become more complicated:
calc(20% + calc(12vw / 1.6) + 6px + 1em)
Rather than trying to determine if a calc is simple enough to unwrap, it
should just be treated as the length portion of the position offset.

In this case, the two offsets would be horizontal: 100% - calc(30% +
20px), vertical: 100% - calc(30% + 20px), which would then serialize back
right calc(30% + 20px) bottom calc(30% + 20px)
Using the horizontal-first, 4-value syntax.

I do think it is possible to combine percentage values in the syntax,
bottom 10% right 20%
Could serialize to 80% 90%.

So perhaps the wording should be that serialization avoids creating new
calc values where possible, instead of the implication that it would
simplify or combine with existing ones.

Received on Wednesday, 5 February 2014 21:44:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:18 UTC