- From: Tavmjong Bah <tavmjong@free.fr>
- Date: Mon, 27 Jan 2014 09:54:06 +0100
- To: Dirk Schulze <dschulze@adobe.com>
- Cc: public-fx <public-fx@w3.org>, www-style@w3.org, www-svg <www-svg@w3.org>
On Fri, 2014-01-17 at 10:00 +0000, Dirk Schulze wrote: > 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’. Yes. Actually, I think that a third keyword should also be included corresponding to the bounding box without stroke/markers/etc. The use cases are probably about equal between wanting a bounding box with and without the stroke. The latter case is especially important in the case of animation where the "stroke" bounding-box can change while the normal bounding-box does not (e.g. a dash pattern is progressing around a non-rectangular object). > 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 Monday, 27 January 2014 08:54:52 UTC