You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-round-display/Overview.bs
+58-63Lines changed: 58 additions & 63 deletions
Original file line number
Diff line number
Diff line change
@@ -415,7 +415,7 @@ Values have the following meanings:
415
415
<dl dfn-for="offset-path">
416
416
<dt><<angle>></dt>
417
417
<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.
419
419
420
420
<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>
421
421
</dd>
@@ -454,7 +454,7 @@ For SVG elements without associated CSS layout box, the <a>used value</a> for <a
454
454
455
455
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>.
456
456
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>
458
458
<pre class='propdef'>
459
459
Name: offset-position
460
460
Applies to: all elements
@@ -466,71 +466,69 @@ For elements with associated CSS layout box, the <a>used value</a> for <a value
466
466
Animatable: as <a href="https://www.w3.org/TR/css3-transitions/#animtype-lpcalc">position</a>
467
467
</pre>
468
468
469
-
Specifies the position of the path.
469
+
Specifies the initial position of the path.
470
470
471
471
Values are defined as follows:
472
472
473
-
<dl>
473
+
<dl dfn-for="offset-position">
474
474
<dt><var>'auto'</var></dt>
475
475
<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>
480
490
481
-
<dl>
482
491
<dt><<position>></dt>
483
492
<dd>
484
493
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>
519
494
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>
531
531
</dd>
532
-
</dl>
533
-
</dd>
534
532
</dl>
535
533
536
534
<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.
605
603
#circle1 {
606
604
offset-path: 0deg;
607
605
offset-distance: 50%;
608
-
offset-position: 50% 50%;
609
606
}
610
607
#circle2 {
611
608
offset-path: 90deg;
612
609
offset-distance: 20%;
613
-
offset-position: 50% 50%;
614
610
}
615
611
#circle3 {
616
612
offset-path: 225deg;
617
613
offset-distance: 100%;
618
-
offset-position: 50% 50%;
619
614
}
620
615
</style>
621
616
</pre>
@@ -843,7 +838,7 @@ This example shows how ''auto'' or ''reverse'' works specified in combination wi
843
838
border-radius: 50%;
844
839
}
845
840
#item1 {
846
-
offset-path: 0deg;
841
+
offset-path: 0deg;
847
842
offset-distance: 90%;
848
843
offset-rotate: auto 90deg;
849
844
}
@@ -858,17 +853,17 @@ This example shows how ''auto'' or ''reverse'' works specified in combination wi
0 commit comments