Re: [css21][css3][svg] SVG and unit-less length values

On 8/14/2010 12:57 PM, Doug Schepers wrote:
>
> Yet there are times and circumstances where that is useful, and where 
> it's worth the effort for the user to calibrate their monitor with a 
> real-world reference (like holding up a ruler to their screen).  For 
> example, in architectural drawings, or with widgets that let you 
> measure things onscreen, like calipers.  SVG is more graphical than 
> CSS+HTML, so these sorts of things do arise more often, perhaps, in SVG.
>
> We are trying to move SVG and CSS closer together, so we need to 
> consider use cases from both.  That said, the most common case 
> (outside of printing, which is too often ignored) does seem to weigh 
> heavily in favor of the abstracted units.

SVG has an amazing system for coordinate space, one that CSS is only 
starting to catch up with.
device-pixel-ratio and transform are two steps along the way.

Working with 2x pixel ratio displays will create more demand for 
improvements to the current state of CSS.
Though pixel ratio does turn the CSS pixel into a relative unit, there 
are some difficulties in specifying quality.

One can not, for instance, set the pixel ratio of individual elements.

I've found that my canvas tags need additional styling:
<canvas width="960" height="640" style="width: 480px; height: 320px;">

Many authors have noticed that they need high-res and low res
stylesheets and supporting images. Some have gone so far as to suggest 
@2 be suffixed
onto image names.

It's a bit of a kludge at the moment.

Here's a fairly good discussion on the matter, from the perspective of 
an HTML/CSS coder:
http://menacingcloud.com/?c=highPixelDensityDisplays

...

Summary: CSS has a few things to learn from SVG.
When that happens, SVG could deprecate a few attributes, such as viewBox 
and its abstract units.


-Charles

Received on Saturday, 14 August 2010 21:19:08 UTC