8000 [css-round-display] Modify the spec for offset-position · ufo-github/csswg-drafts@ff5c149 · GitHub
Skip to content

Commit ff5c149

Browse files
author
Jihye Hong
committed
[css-round-display] Modify the spec for offset-position
1 parent 688b5f8 commit ff5c149

File tree

2 files changed

+103
-112
lines changed

2 files changed

+103
-112
lines changed

css-round-display/Overview.bs

Lines changed: 58 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ Values have the following meanings:
415415
<dl dfn-for="offset-path">
416416
<dt><<angle>></dt>
417417
<dd>
418-
The path is a straight line that has the degree of the angle as specified in <<angle>> from the Y-axis. The initial position of the path is defined by 'offset-position' and the end point of the path is on the edge of the containing block.
418+
The path is a straight line that has the degree of the angle as specified in <<angle>> from the Y-axis. The initial position of the path is the center of the containing block and the end point of the path is on the edge of the containing block.
419419

420420
<p class="note">Note: Defining the path with <<angle>>, the element can be positioned in the polar coordinate system. In polar coordinates, a pole is the reference point and points are described as been a certain distance from it, as also a certain angle from the polar axis. In mathematical theory, the polar axis is commonly defined as the positive direction of the x-axis, but we consider the polar axis as the positive direction of the y-axis position as other CSS specifications usually do. Therefore, when the <<angle>> value of 'offset-path' is 0, the element is positioned on the y-axis. If the <<angle>> value increases in the positive direction from 0, the element moves clockwise. The method to determine a direction using the <<angle>> value for 'offset-path' works the same way in [[!CSS3VAL]], <<angle>> value.</p>
421421
</dd>
@@ -454,7 +454,7 @@ For SVG elements without associated CSS layout box, the <a>used value</a> for <a
454454

455455
For elements with associated CSS layout box, the <a>used value</a> for <a value for=clip-path>fill-box</a>, <a value for=clip-path>stroke-box</a> and <a value for=clip-path>view-box</a> is <a value for=mask-clip>border-box</a>.
456456

457-
<h3 id="offset-position-property">Define the starting point of the path: The 'offset-position' property</h3>
457+
<h3 id="offset-position-property">Define the initial position of the path: The 'offset-position' property</h3>
458458
<pre class='propdef'>
459459
Name: offset-position
460460
Applies to: all elements
@@ -466,71 +466,69 @@ For elements with associated CSS layout box, the <a>used value</a> for <a value
466466
Animatable: as <a href="https://www.w3.org/TR/css3-transitions/#animtype-lpcalc">position</a>
467467
</pre>
468468

469-
Specifies the position of the path.
469+
Specifies the initial position of the path.
470470

471471
Values are defined as follows:
472472

473-
<dl>
473+
<dl dfn-for="offset-position">
474474
<dt><var>'auto'</var></dt>
475475
<dd>
476-
Computes to '50% 50%'('center') if the value for 'offset-path' is specified with <<angle>> and the element is positioned in polar coordinates. In polar coordinates, there are many use cases specifying the position of the origin at the center point of the containing block. Therefore the element is positioned to the horizontally and vertically center in the area of the containing block when auto is given to the 'offset-position'.
477-
But the other value types for 'offset-path', it computes to '0% 0%' because 'offset-path' also specifies the initial position.
478-
</dd>
479-
</dl>
476+
Computes differently according to the type of value of 'offset-path':
477+
<dl>
478+
<dt><<angle>></dt>
479+
<dd>The center of the containing block</dd>
480+
<dt><<circle()>>, <<ellipse()>></dt>
481+
<dd>The point where a virtual tangent to the circle/ellipse would reach the top vertical position</dd>
482+
<dt><<inset()>></dt>
483+
<dd>The left top corner of the rectangle</dd>
484+
<dt><<polygon()>></dt>
485+
<dd>The first coordinate pair of the polygon</dd>
486+
<dt><<path()>></dt>
487+
<dd>The first "move to" argument in the path string</dd>
488+
</dl>
489+
</dd>
480490

481-
<dl>
482491
<dt><<position>></dt>
483492
<dd>
484493
Values of <<position>> are defined like below:
485-
<dl>
486-
<dt><<percentage>></dt>
487-
<dd>
488-
A percentage for the horizontal offset is relative to the width of the containing block. A percentage for the vertical offset is relative to height of the containing block.
489-
</dd>
490-
</dl>
491-
492-
<dl>
493-
<dt><<length>></dt>
494-
<dd>
495-
A length value gives a fixed length as the offset. The value for the horizontal and vertical offset represent an offset from the top left corner of the containing block.
496-
</dd>
497-
</dl>
498-
499-
<dl>
500-
<dt><dfn>top</dfn></dt>
501-
<dd>
502-
Computes to 0% for the vertical position.
503-
</dd>
504-
</dl>
505-
506-
<dl>
507-
<dt><dfn>right</dfn></dt>
508-
<dd>
509-
Computes to 100% for the horizontal position.
510-
</dd>
511-
</dl>
512-
513-
<dl>
514-
<dt><dfn>bottom</dfn></dt>
515-
<dd>
516-
Computes to 100% for the vertical position.
517-
</dd>
518-
</dl>
519494

520-
<dl>
521-
<dt><dfn>left</dfn></dt>
522-
<dd>
523-
Computes to 0% for the horizontal position.
524-
</dd>
525-
</dl>
526-
527-
<dl>
528-
<dt><dfn>center</dfn></dt>
529-
<dd>
530-
Computes to 50% (left 50%) for the horizontal position if the horizontal position is not otherwise specified, or 50% (top 50%) for the vertical position if it is.
495+
<dl>
496+
<dt><<percentage>></dt>
497+
<dd>
498+
A percentage for the horizontal offset is relative to the width of the containing block. A percentage for the vertical offset is relative to height of the containing block.
499+
</dd>
500+
501+
<dt><<length>></dt>
502+
<dd>
503+
A length value gives a fixed length as the offset. The value for the horizontal and vertical offset represent an offset from the top left corner of the containing block.
504+
</dd>
505+
506+
<dt><dfn>top</dfn></dt>
507+
<dd>
508+
Computes to 0% for the vertical position.
509+
</dd>
510+
511+
<dt><dfn>right</dfn></dt>
512+
<dd>
513+
Computes to 100% for the horizontal position.
514+
</dd>
515+
516+
<dt><dfn>bottom</dfn></dt>
517+
<dd>
518+
Computes to 100% for the vertical position.
519+
</dd>
520+
521+
<dt><dfn>left</dfn></dt>
522+
<dd>
523+
Computes to 0% for the horizontal position.
524+
</dd>
525+
526+
<dt><dfn>center</dfn></dt>
527+
<dd>
528+
Computes to 50% (left 50%) for the horizontal position if the horizontal position is not otherwise specified, or 50% (top 50%) for the vertical position if it is.
529+
</dd>
530+
</dl>
531531
</dd>
532-
</dl>
533-
</dd>
534532
</dl>
535533

536534
<h3 id="offset-distance-property">Position on the path: The 'offset-distance' property</h3>
@@ -605,17 +603,14 @@ See the section Motion processing for how to process a motion position.
605603
#circle1 {
606604
offset-path: 0deg;
607605
offset-distance: 50%;
608-
offset-position: 50% 50%;
609606
}
610607
#circle2 {
611608
offset-path: 90deg;
612609
offset-distance: 20%;
613-
offset-position: 50% 50%;
614610
}
615611
#circle3 {
616612
offset-path: 225deg;
617613
offset-distance: 100%;
618-
offset-position: 50% 50%;
619614
}
620615
&lt;/style>
621616
</pre>
@@ -843,7 +838,7 @@ This example shows how ''auto'' or ''reverse'' works specified in combination wi
843838
border-radius: 50%;
844839
}
845840
#item1 {
846-
offset-path: 0deg;
841+
offset-path: 0deg;
847842
offset-distance: 90%;
848843
offset-rotate: auto 90deg;
849844
}
@@ -858,17 +853,17 @@ This example shows how ''auto'' or ''reverse'' works specified in combination wi
858853
offset-rotate: auto -90deg;
859854
}
860855< 1898 /code>
#item4 {
861-
offset-path: 180deg;
856+
offset-path: 180deg;
862857
offset-distance: 90%;
863858
offset-rotate: auto -90deg;
864859
}
865860
#item5 {
866-
offset-path: 225deg;
861+
offset-path: 225deg;
867862
offset-distance: 90%;
868863
offset-rotate: auto -90deg;
869864
}
870865
#item6 {
871-
offset-path: -45deg;
866+
offset-path: -45deg;
872867
offset-distance: 90%;
873868
offset-rotate: auto 90deg;
874869
}

0 commit comments

Comments
 (0)