Content Dimensions for XHTML and SVG

2 posts / 0 new
Last post

The current draft notes something for the fixed layout about the dimensions of the content:

a) for XHTML:

1) it notes to use something like
<meta name="viewport" content="width=1200, height=600"/>
well, there is no precise definition, what this means, but at least by wording one can assume,
that something like a viewBox in SVG is intended, and width and height indicate some relations,
but it is not mentioned, what units are used (Typically for a meaningful Layout with CSS for some content including text one will for example use em and ex, it would be stupid for example to fix the font-size to some px-related size - and even if px-related - device pixels or obfuscated CSS 2.1 pixels?)
Even more, where does the viewBox start - if we compare with SVG, this needs four numbers to give this information, where the relevant information of the document is located.

2) Note that 'syntax defined in [MetaTags]' references some document that is presented to be empty (at least with my security settings, even by switching off CSS interpretation, the presentation remains empty, what means, if there is content at all, it is not accessible), if this reference matters at all for the draft, this needs to be noted within the draft in an accessible way.
But anyway, the empty page is referenced only as informative - this effectively means, that the syntax is not defined at all - if it matters, define it, if not, skip the reference of an empty page and maybe the complete paragraph about XHTML.

b) for SVG note:

1) there can be a combination like width="15em"; height="20em" viewBox="-300 200 1500 2000"
this means, the numbers in viewBox are only local units, here 1500 local untis means 15em

2) without width and height or as in the example if they are 100%, the content is scaled to the available viewport, this means effectively an automatic scaling to the available space. To get a somehow fixed dimension of an SVG, one has to set width and height to non percentage values explictly.

3) Note, that depending on the value of the attribute preserveAspectRatio the relation between available viewport, viewBox and displayed content changes - try for example to switch between meet and slice to see the difference.

4) Note even more, deviating from the description for the XHTML feature, viewBox itself does not give a clipping area, this is given more or less by width and height of the root svg. Maybe a good idea to mention this difference in the draft.

c) Were W3C media fragments considered as well as an alterantive?

This seems to be still ignored in the published Version 3.0.1 :-(

Still the referenced proprietary apple definition of the meta viewport seems to be not accessible (empty presentation), I think, in a related CSS draft about this issue such a notation is already marked as outdated, nothing one should use.

Even more it is not obvious, why to repeat this information in each content document again, if already available in the OPF metainformation.

And as already noted, still not obvious, how this initial containing box might be related to the
SVG viewBox for examples like these:

<svg version="1.1" xmlns=""
width="20em" height="20em" viewBox="-100 -50 200 400" preserveAspectRatio="none" >
<!-- etc -->

Or to take an example directly from the SVG recommendation:

<svg version="1.1" xmlns=""
preserveAspectRatio="xMaxYMax slice" viewBox="0 0 30 40"
width="50" height="30">
<!-- etc -->

Secondary menu