W3C home > Mailing lists > Public > www-svg@w3.org > January 2014

[css-masking] SVG related reference boxes beside background boxes

From: Dirk Schulze <dschulze@adobe.com>
Date: Fri, 17 Jan 2014 10:00:19 +0000
To: public-fx <public-fx@w3.org>, "<www-style@w3.org>" <www-style@w3.org>, www-svg <www-svg@w3.org>, Tavmjong Bah <tavmjong@free.fr>
Message-ID: <F9C86615-B28E-4762-87F7-31848B1BEF82@adobe.com>
Hi,

In the following I am referencing the clip-path property[1]. What ever we do, it affects the mask-* properties[2] as well.

Currently clip-path uses the <shape-box> reference boxes (CSS backgrounds <box> + margin-box) which includes the keywords:

content-box
padding-box
border-box
margin-box

Tav objected to redefine the meaning of the keywords to element in an SVG context and added that the viewport (often used as reference box for SVG resources) can not be addressed.

Tav suggested adding two more keywords:

1) A keyword that represents the tight reference box including the stroke area + (styled) markers which some call 'stroke-bounding-box'
2) A keyword that represents the viewport as reference box with the name ‘viewport’.

Note: The SVG2 draft has a definition of the stroke bounding box which could be used for 1)[3]
Note 2: The viewport in SVG depends on the size of a viewport creating element like <svg>. It does not clip to the window size and scrolling does not influence the viewport either (overflow: scroll is not defined for SVG.)

The <shape-box>es will probably fall back to a default bounding box for SVG content. Possibly objectBoundingBox but could also be stroke-bounding-box or viewport.

The ‘viewport' keyword could make sense in the HTML world as well and is similar in the behavior of an attached clip-path.
’stroke-bounding-box’ doesn’t really exist for HTML elements. The UA could fallback to the default reference box instead.

I did not do any edits yet. I still hope that we could reuse the existing keywords especially for the use case of ’stroke-bounding-box’. The ‘viewport’ keyword may make sense in SVG and HTML but the behavior might still differ. The context of the element would determine the behavior.

Greetings,
Dirk

PS: I added all relevant mailing lists to address as many people as possible. For the further discussion we should pick one and I suggest www-style.

[1] http://dev.w3.org/fxtf/css-masking-1/#propdef-clip-path
[2] http://dev.w3.org/fxtf/css-masking-1/#the-mask-origin
[3] https://svgwg.org/svg2-draft/types.html#__svg__SVGGraphicsElement__getStrokeBBox
Received on Friday, 17 January 2014 10:00:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:54:50 UTC