Skip to content

Commit 43d548f

Browse files
author
Jihye Hong
committed
[css-round-display] Modify description of 'polar-distance' and 2d rotate function for polar
1 parent 32e909a commit 43d548f

3 files changed

Lines changed: 90 additions & 76 deletions

File tree

css-round-display/Overview.bs

Lines changed: 44 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,12 @@ Figure 6B might be the result of
343343
</div>
344344

345345
<h3 id="polar-origin-property">The 'polar-origin' property</h3>
346+
<p>
346347
The 'polar-origin' property sets a point of origin for polar coordinate system.
348+
<br>
349+
In conventional coordinate system, the origin of coordinate system implicitly set to upper left corner of the containing block. According to the origin, not only elements are positioned within the containing block but also prope
350+
기존 방식은 origin이 암시적으로(implicitly) containing block의 left-top으로 셋팅이 되어있고, 해당 origin을 기준으로 엘리먼트가 배치되고 display, margin, padding 등의 property들도 이러한 배경하에 동작을 했다. 하지만 polar좌표계에서는 이러한 origin이 기존의 left-top이 아닌 center로 명시되는 것이 합리적이며, 이 값은 필요에 따라 변경 가능한 상황이 발생할 수 있다.
351+
</p>
347352
<pre class='propdef'>
348353
Name: polar-origin
349354
Applies to: all elements
@@ -376,7 +381,7 @@ Where
376381
]
377382
</dl>
378383

379-
Values are defined like below:
384+
Values are defined as follows:
380385

381386
<dl>
382387
<dt><var>&lt;percentage&gt;</var></dt>
@@ -393,35 +398,35 @@ A length value gives a fixed length as the offset. The value for the horizontal
393398
</dl>
394399

395400
<dl>
396-
<dt>top</dt>
401+
<dt><var>top</var></dt>
397402
<dd>
398403
Computes to 0% for the vertical position.
399404
</dd>
400405
</dl>
401406

402407
<dl>
403-
<dt>right</dt>
408+
<dt><var>right</var></dt>
404409
<dd>
405410
Computes to 100% for the horizontal position.
406411
</dd>
407412
</dl>
408413

409414
<dl>
410-
<dt>bottom</dt>
415+
<dt><var>bottom</var></dt>
411416
<dd>
412417
Computes to 100% for the vertical position.
413418
</dd>
414419
</dl>
415420

416421
<dl>
417-
<dt>left</dt>
422+
<dt><var>left</var></dt>
418423
<dd>
419424
Computes to 0% for the horizontal position.
420425
</dd>
421426
</dl>
422427

423428
<dl>
424-
<dt>center</dt>
429+
<dt><var>center</var></dt>
425430
<dd>
426431
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.
427432
</dd>
@@ -431,6 +436,9 @@ Computes to 50% (left 50%) for the horizontal position if the horizontal positio
431436
<p class="issue">
432437
Between the item and the containing block, which is appropriate for polar-origin value to be referenced of?
433438
</p>
439+
<p class="issue">
440+
According to enable to specify the point of origin for polar coordinates, properties for specifying layout such as 'margin', 'padding' would work different from the conventional coordinate system. We need different approaches to define those properties.
441+
</p>
434442

435443
<h3 id="polar-angle-property">The 'polar-angle' property</h3>
436444
The 'polar-angle' property specifies the angle from the Y-axis. This property is activated on condition of position: polar.
@@ -450,21 +458,17 @@ The 'polar-distance' property determines how far elements are positioned from th
450458
<pre class='propdef'>
451459
Name: polar-distance
452460
Applies to: all elements
453-
Value: [ <<length>> | <<percentage>> ] contain?
461+
Value: [ <<length>> | <<percentage>> ] && contain?
454462
Initial: 0
455463
Media: visual
456464
Inherited: no
457465
Percentages: relative to distance from the origin of polar coordinates to edge of containing block
458466
Animatable: as <a href="http://www.w3.org/TR/css3-transitions/#animtype-lpcalc">length, percentage, or calc</a>
459467
</pre>
460468
<p>
461-
Where
462-
<dl>
463-
<b>&lt;polar-distance&gt;</b> = [ <var>&lt;length&gt;</var> | <var>&lt;percentage&gt;</var> ] contain?
464-
</dl>
469+
The <code>'polar-distance'</code> specifies the distance between the origin of polar coordinates and the anchor point of the element.
470+
465471
<br>
466-
The first value specifies the distance between the origin of polar coordinates and the anchor point of the element. The second value may be omitted. If not so, it affects the calculated value of the first value.
467-
<br><br>
468472
Values have the following meanings:
469473
<dl>
470474
<dt><var>&lt;length&gt;</var></dt>
@@ -479,9 +483,12 @@ A percentage is relative to the distance from a point of contact which is made b
479483
</dd>
480484
</dl>
481485
<dl>
482-
<dt>contain</dt>
486+
<dt><var>contain</var></dt>
483487
<dd>
484-
Adjust polar-distance value when positioned element within containing block overflows shape of the containing block. The main purpose for this value is avoiding overflow of positioning elements. When overflowing occurs, the distance between the center point of containing block and the anchor point of the element is reduced until there are less than 2 points of contact between edge of shape of containing block and content block of the element.
488+
Adjust polar-distance value of the positioned element which overflows shape of the containing block.
489+
The main purpose of this value is avoiding overflow when positioning elements.
490+
When overflowing occurs, the distance between the point of origin of polar coordinates and the anchor point of the element is reduced,
491+
until there are 2 contact points or less between edge of shape of containing block and content block of the element.
485492
</dd>
486493
</dl>
487494
</p>
@@ -629,19 +636,28 @@ Is '<code>auto</code>' needed for value of 'polar-anchor'?
629636
How to solve overflowing when an element has 'polar-anchor' value as '<code>top</code>', 'polar-angle' value is 0deg, and 'polar-distance' is equal to the distance from center to edge of containing block?
630637
</p>
631638

632-
<h2 id="extending-svg-transform-functions">Rotating content in polar coordinates</h2>
633-
<h3 id="2d-rotation-transform-function">2D Rotation Transform Function</h3>
639+
<h3 id="2d-rotation-transform-function">2D Rotation Transform Function for self-rotating elements in polar coordinates</h3>
634640
<p>
635-
The 'transform' property supports all transform functions by <a href="http://www.w3.org/TR/SVG/coords.html#TransformAttribute">The ''transform'' attribute</a> in [[SVG11]].
636641
When elements are positioned in polar coordinates, there are many usecases which show the elements rotated toward the origin of polar coordinates. In such cases, degree of rotation has to be specified in the 2d rotation function for each element. But when using the keyword value instead of the <<angle>> value, the calculation of accurate rotation degree may be omitted.
637642
<br><br>
638643
The two-dimensional rotation function <code><a href="http://www.w3.org/TR/css3-transforms/#funcdef-rotate">'rotate(<angle>)'</a></code> used in polar coordinates is extended as follows:
639644
<dl><dd>
640-
<code><a href="http://www.w3.org/TR/css3-transforms/#funcdef-rotate">rotate()</a> = rotate( [<<angle>> | [center | counter-center]] [, <<translation-value>>, <<translation-value>>]?)</code>
645+
<code><a href="http://www.w3.org/TR/css3-transforms/#funcdef-rotate">rotate()</a> = rotate( <<angle>> | center | counter-center)</code>
641646
</dd></dl>
642-
The '<code>center</code>' keyword means that the element is rotated with the 'polar-angle' value. Therefore, when the anchor point of an element is center point of the
643-
element, a straight line passing through the anchor point meets the origin of the containing block.<br>
644-
And for the '<code>counter-center</code>', the element is rotated by the angle of the 'polar-angle' plus 180 degrees.
647+
Values have the following meanings:
648+
<dl>
649+
<dt><var>center</var></dt>
650+
<dd>
651+
Rotate an element by the 'polar-angle' value. Therefore, when the anchor point of an element is center point of the
652+
element and there is a perpendicular line which passes through the anchor point, the line meets the origin of the containing block.
653+
</dd>
654+
</dl>
655+
<dl>
656+
<dt><var>counter-center</var></dt>
657+
<dd>
658+
Rotate an element by the angle of the 'polar-angle' plus 180 degrees.
659+
</dd>
660+
</dl>
645661
</p>
646662
<div class='example'>
647663
This example shows how the keyword value works in the 2d rotation function.
@@ -686,12 +702,12 @@ This example shows how the keyword value works in the 2d rotation function.
686702
}
687703
&lt;/style>
688704
&lt;body>
689-
&lt;div id="item1">A&lt;/div>
690-
&lt;div id="item2">B&lt;/div>
691-
&lt;div id="item3">C&lt;/div>
692-
&lt;div id="item4">D&lt;/div>
693-
&lt;div id="item5">E&lt;/div>
694-
&lt;div id="item6">F&lt;/div>
705+
&lt;div id="item1">1&lt;/div>
706+
&lt;div id="item2">2&lt;/div>
707+
&lt;div id="item3">3&lt;/div>
708+
&lt;div id="item4">4&lt;/div>
709+
&lt;div id="item5">5&lt;/div>
710+
&lt;div id="item6">6&lt;/div>
695711
&lt;/body>
696712
</pre>
697713
<div style="width: 500px; text-align: center">

0 commit comments

Comments
 (0)