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
+53-43Lines changed: 53 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -276,9 +276,9 @@ The example below shows how the 'border-boundary' property works on drawing bord
276
276
<h2 id="positioning-content">Positioning content by using the polar coordinate system</h2>
277
277
278
278
<p>
279
-
Polar coordinate system is a two-dimensional coordinate system that describes the position of a point in a plane with a distance from a reference point and an angle from a reference direction. Elements could be placed along a circle or concentric circles, and the polar coordinate system is useful to handle such cases.
279
+
Polar coordinate system is a two-dimensional coordinate system that describes the position of a point in a plane with a distance from a reference point and an angle from a reference direction. Elements could be placed along a circle or concentric circles, and the polar coordinate system is useful to handle such cases.
280
280
281
-
This section introduces polar positioning to support layout of elements in the polar coordinate system where the position of an element is determined by a distance from the center point within the containing element and an angle from the Y-axis.
281
+
This section introduces polar positioning to support layout of elements in the polar coordinate system where the position of an element is determined by a distance from the center point within the containing element and an angle from the Y-axis.
282
282
283
283
We add '<code>polar</code>' to the value of the 'position' property to support the polar coordinates of an element itself. The 'polar-angle' and 'polar-distance' properties specify the position of an element.
284
284
</p>
@@ -302,14 +302,14 @@ When the 'position' property on an element is set to '<code>polar</code>', the e
302
302
Note: The center point of the containing block of an element indicates the origin of polar coordinate when the value of position property of the element is '<code>polar</code>'.
303
303
</p>
304
304
<p>
305
-
In conventional coordinate system used in the web, the origin is positioned in the upper left corner of a containing block. In comparison, the origin of polar coordinates is the center point of a containing block. Therefore different methods are required to deploy and transform elements, or set margin/padding values when using polar coordinates.
305
+
In conventional coordinate system used in the web, the origin is positioned in the upper left corner of a containing block. In comparison, the origin of polar coordinates is the center point of a containing block. Therefore different methods are required to deploy and transform elements, or set margin/padding values when using polar coordinates.
306
306
307
307
An example as below shows the difference between the conventional coordinates and the polar coordinates when positioning elements.
308
308
</p>
309
309
<div class='example'>
310
-
The codes below show the difference between conventional coordinate system in the web and polar coordinate system when positioning elements.
310
+
The codes below show the difference between conventional coordinate system in the web and polar coordinate system when positioning elements.
The ‘polar-anchor’ property sets an anchor point of the element. The anchor point specifies a position which is a representative point of the element. The anchor point could be set as any point within a content area of the element rather than being positioned to the upper left corner of the element by CSS box model.
399
+
The 'polar-anchor' property sets an anchor point of the element. The anchor point specifies a position which is a representative point of the element. The anchor point could be set as any point within a content area of the element rather than being positioned to the upper left corner of the element by CSS box model.
400
400
401
401
With position: polar, the value of polar-distance is given to the distance between an anchor point and a center point of a containing block.
402
402
</p>
403
403
<pre class='propdef'>
404
404
Name: polar-anchor
405
405
Applies to: all elements
406
406
Value: <<position>>
407
-
Initial: center
407
+
Initial: 50% 50%
408
408
Media: visual
409
409
Inherited: no
410
410
Percentages: relative to width and height of an element
411
411
Animatable: as <<position>>
412
412
</pre>
413
413
<p>
414
-
The property's value is given as <position> specified in ‘background-position’ property, but meanings of some keywords in value type are different in ‘polar-anchor’ property.
414
+
The property's value is given as <position> specified in 'background-position' property, but meanings of some keywords in value type are different in 'polar-anchor' property.
[ left | center | right | top | bottom | <var><percentage></var> | <var><length></var> ]
418
+
<b><position></b> = [
419
+
<br>
420
+
[ left | center | right | top | bottom | <var><percentage></var> | <var><length></var> ]
421
+
<br>
423
422
|
424
-
[ left | center | right | <var><percentage></var> | <var><length></var> ]
425
-
[ top | center | bottom | <var><percentage></var> | <var><length></var> ]
423
+
<br>
424
+
[ left | center | right | <var><percentage></var> | <var><length></var> ]
425
+
<br>
426
+
[ top | center | bottom | <var><percentage></var> | <var><length></var> ]
427
+
<br>
426
428
|
427
-
[ center | [ left | right ] [ <var><percentage></var> | <var><length></var> ]? ] &&
428
-
[ center | [ top | bottom ] [ <var><percentage></var> | <var><length></var> ]? ]
429
+
<br>
430
+
[ center | [ left | right ][ <var><percentage></var> | <var><length></var> ]? ] &&
431
+
<br>
432
+
[ center | [ top | bottom ][ <var><percentage></var> | <var><length></var> ]? ]
433
+
<br>
429
434
]
430
-
</pre>
431
-
<p>
435
+
</dl>
436
+
437
+
<dl>
432
438
<dt><var><percentage></var></dt>
433
439
<dd>
434
-
A percentage for the horizontal offset is relative to width of content box area of the element. A percentage for the vertical offset is relative to height of content box area of the element. For example, with a value pair of ‘100%, 0%’, an anchor point is on the upper right corner of the element.
440
+
A percentage for the horizontal offset is relative to width of content box area of the element. A percentage for the vertical offset is relative to height of content box area of the element. For example, with a value pair of '100%, 0%', an anchor point is on the upper right corner of the element.
435
441
</dd>
442
+
</dl>
436
443
444
+
<dl>
437
445
<dt><var><length></var></dt>
438
446
<dd>
439
447
A length value gives a length offset from the upper left corner of the element’s content area.
440
448
</dd>
449
+
</dl>
441
450
</p>
451
+
442
452
<p>
443
-
Only with 'polar-angle' and 'polar-distance' to position elements, adjusting values of those properties for avoiding elements sticking out of the containing block is required. When the appropriate anchor point is given, there is no need to adjust polar-distance value to avoid overflowing when positioning elements in the containing block.
453
+
Only with 'polar-angle' and 'polar-distance' to position elements, adjusting values of those properties for avoiding elements sticking out of the containing block is required. When the appropriate anchor point is given, there is no need to adjust 'polar-distance' value to avoid overflowing when positioning elements in the containing block.
444
454
</p>
445
455
446
456
<div class='example'>
447
457
This example shows an alignment of four elements with different anchor points positioned in a containing block.
448
458
449
459
<pre><style>
450
-
#item1 {
451
-
position: polar;
460
+
461
+
#item1 {
462
+
position: polar;
452
463
polar-angle: 45deg;
453
464
polar-distance: 100%;
454
465
polar-anchor: right top;
455
-
456
-
}
457
-
#item2 {
458
-
position: polar;
466
+
}
467
+
#item2 {
468
+
position: polar;
459
469
polar-angle: 135deg;
460
470
polar-distance: 100%;
461
471
polar-anchor: right bottom;
462
-
}
463
-
#item3 {
464
-
position: polar;
472
+
}
473
+
#item3 {
474
+
position: polar;
465
475
polar-angle: 225deg;
466
-
polar-distance: 100%;
476
+
polar-distance: 100%;
467
477
polar-anchor: left bottom;
468
-
}
469
-
#item4 {
470
-
position: polar;
478
+
}
479
+
#item4 {
480
+
position: polar;
471
481
polar-angle: 315deg;
472
-
polar-distance: 100%;
482
+
polar-distance: 100%;
473
483
polar-anchor: left top;
474
-
}
484
+
}
475
485
</style>
476
486
<body>
477
-
<div id="item1"></div>
478
-
<div id="item2"></div>
479
-
<div id="item3"></div>
487
+
<div id="item1"></div>
488
+
<div id="item2"></div>
489
+
<div id="item3"></div>
480
490
<div id="item4"></div>
481
491
</body>
482
492
</pre>
483
493
<div style="width: 400px; text-align: center">
484
-
<img alt="An image of four elements with different anchor points positioned in a containing block" src="images/polar_anchor.png" style="width: 200px; border: 1px #AAA solid; text-align: center"/>
494
+
<img alt="An image of four elements with different anchor points positioned in a containing block" src="images/polar_anchor.png" style="width: 300px; text-align: center"/>
485
495
<p class="caption">An example of 'polar-anchor'</p>
486
496
</div>
487
497
</div>
488
498
<p class="issue">
489
-
Is ‘auto’ needed for value of ‘polar-anchor’?
499
+
Is '<code>auto</code>' needed for value of 'polar-anchor'?
490
500
</p>
491
501
<p class="issue">
492
-
How to solve overflowing when an anchor point is set to ‘top’, polar-angle value is 0deg and polar-distance is equal to the distance from center to edge of containing block?
502
+
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?
0 commit comments