Skip to content

Commit 98ee360

Browse files
committed
[css-transforms-1] Add stroke-box and content-box to transform-box and align box mapping. w3c#999
1 parent b1f242d commit 98ee360

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

css-transforms-1/Overview.bs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ This coordinate space can be modified with the 'transform' property. Using trans
111111
Module Interactions {#module-interactions}
112112
------------------------------------------
113113

114-
This module defines a set of CSS properties that affect the visual rendering of elements to which those properties are applied; these effects are applied after elements have been sized and positioned according to the <a href="https://www.w3.org/TR/CSS2/visuren.html">visual formatting model</a> from [[!CSS2]]. Some values of these properties result in the creation of a <a href="https://www.w3.org/TR/CSS2/visuren.html#containing-block">containing block</a>, and/or the creation of a <a spec="css21">stacking context</a>.
114+
This module defines a set of CSS properties that affect the visual rendering of elements to which those properties are applied; these effects are applied after elements have been sized and positioned according to the <a href="https://www.w3.org/TR/CSS2/visuren.html">visual formatting model</a> from [[!CSS2]]. Some values of these properties result in the creation of a <a href="https://www.w3.org/TR/CSS2/visuren.html#containing-block">containing block</a>, and/or the creation of a <a>stacking context</a>.
115115

116116
Transforms affect the rendering of backgrounds on elements with a value of ''fixed'' for the 'background-attachment' property, which is specified in [[!CSS3BG]].
117117

@@ -416,7 +416,7 @@ Transform reference box: the 'transform-box' property {#transform-box}
416416

417417
<pre class='propdef'>
418418
Name: transform-box
419-
Value: border-box | fill-box | view-box
419+
Value: content-box | border-box | fill-box | stroke-box | view-box
420420
Initial: view-box
421421
Applies to: [=transformable elements=]
422422
Inherited: no
@@ -429,20 +429,24 @@ Animatable: no
429429
All transformations defined by the 'transform' and 'transform-origin' property are relative to the position and dimensions of the <dfn>reference box</dfn> of the element. The [=reference box=] is specified by one of the following:
430430

431431
<dl dfn-for=transform-box>
432+
: <dfn dfn-type=value>content-box</dfn>
433+
:: Uses the content box as reference box. The reference box of a table is the border box of its <a href="https://www.w3.org/TR/CSS21/tables.html#model">table wrapper box</a>, not its table box.
434+
432435
: <dfn dfn-type=value>border-box</dfn>
433436
:: Uses the border box as reference box. The reference box of a table is the border box of its <a href="https://www.w3.org/TR/CSS21/tables.html#model">table wrapper box</a>, not its table box.
434437

435438
: <dfn dfn-type=value>fill-box</dfn>
436439
:: Uses the <a>object bounding box</a> as reference box.
437440

441+
: <dfn dfn-type=value>stroke-box</dfn>
442+
:: Uses the <a>stroke bounding box</a> as reference box.
443+
438444
: <dfn dfn-type=value>view-box</dfn>
439445
:: Uses the nearest <a href="https://www.w3.org/TR/SVG11/intro.html#TermSVGViewport">SVG viewport</a> as reference box.
440446

441447
If a {{viewBox}} attribute is specified for the <a href="https://www.w3.org/TR/SVG11/intro.html#TermSVGViewport">SVG viewport</a> creating element:
442448
* The reference box is positioned at the origin of the coordinate system established by the {{viewBox}} attribute.
443449
* The dimension of the reference box is set to the <em>width</em> and <em>height</em> values of the {{viewBox}} attribute.
444-
445-
Issue(w3c/csswg-drafts#999): Follow used value definition of Fill and Stroke specs/SVG2?
446450
</dl>
447451

448452
For the SVG <{pattern}> element, the reference box gets defined by the <{pattern/patternUnits}> attribute [[!SVG2]].
@@ -453,10 +457,9 @@ For the SVG <a element>clipPath</a> element, the reference box gets defined by t
453457

454458
A reference box adds an additional offset to the origin specified by the 'transform-origin' property.
455459

456-
For SVG elements without an associated CSS layout box, the [=used value=] for ''transform-box/border-box'' is ''transform-box/view-box''.
457-
458-
For elements with an associated CSS layout box, the [=used value=] for ''transform-box/fill-box'' and ''transform-box/view-box'' is ''transform-box/border-box''.
460+
For SVG elements without associated CSS layout box, the [=used value=] for ''transform-box/content-box'' is ''transform-box/fill-box'' and for ''transform-box/border-box'' is ''transform-box/stroke-box''.
459461

462+
For elements with associated CSS layout box, the [=used value=] for ''transform-box/fill-box'' is ''transform-box/content-box'' and for ''transform-box/stroke-box'' and ''transform-box/view-box'' is ''transform-box/border-box''.
460463

461464
The SVG <a element-attr for>transform</a> Attribute {#svg-transform}
462465
====================================================================
@@ -1472,6 +1475,7 @@ The following changes were made since the <a href="https://www.w3.org/TR/2017/WD
14721475
* Be more specific about computation of [=transformation matrix=] and [=current transformation matrix=].
14731476
* Define reference box for paint servers and <{clipPath}> element.
14741477
* Specify behavior of transform presentation attribute with 3-value-rotate as start or end value of a transition.
1478+
* Add ''transform-box/stroke-box'' and ''transform-box/content-box'' to 'transform-box'. Align box mapping behavior across all specifications.
14751479
* Editorial changes.
14761480

14771481
<h2 class=no-num id='acknowledgments'>Acknowledgments</h2>

0 commit comments

Comments
 (0)