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
[css-round-display] Get rid of polar value in position property and add a description about enbling polar positioning when polar-distance is given non-auto value
@@ -281,29 +281,18 @@ Polar coordinate system is a two-dimensional coordinate system that describes th
281
281
282
282
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.
283
283
284
-
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
+
The 'polar-angle' and 'polar-distance' properties specify the position of an element in polar coordinates.
285
+
When 'polar-distance' isn't auto, it means an element will be positioned by polar positioning not by the conventional two-dimensional positioning.
286
+
If one of the properties such as left, top, right, bottom isn't auto,
287
+
properties related to polar positioning are ignored.
288
+
285
289
</p>
286
290
<p class="note">
287
291
Note: In polar coordinate system, 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 'polar-angle' value of an element is 0, the element is positioned on the y-axis. If the angle value of an element increases in the positive direction from 0, the element moves clockwise. The method to determine a direction using 'polar-angle' works the same way in [[CSS-VALUES]], <<angle>> value.
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>'.
304
-
</p>
293
+
305
294
<p>
306
-
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.
295
+
In conventional coordinate system used in the web, the origin is positioned in the upper left corner of a containing block. In comparison, the default 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.
307
296
308
297
An example as below shows the difference between the conventional coordinates and the polar coordinates when positioning elements.
309
298
</p>
@@ -320,20 +309,20 @@ Figure 6A might be the result of
<img alt="An image aligning two elements to containing block in the conventional coordinate system" style="width: 300px" src="images/polar_position_a.png">
332
-
<p>(A) With 'position: <code>absolute</code>'</p>
321
+
<p>(A) With 'position: <code>absolute</code>;'</p>
333
322
</div>
334
323
<div style="float: left; width: 350px; ">
335
324
<img alt="An image aligning two elements to containing block in the polar coordinate system" style="width: 300px" src="images/polar_position_b.png">
336
-
<p>(B) With 'position: <code>polar</code>'</p>
325
+
<p>(B) With 'position: <code>absolute</code>; polar-distance: 0%;'</p>
337
326
</div>
338
327
</div>
339
328
<div style="width: 700px">
@@ -342,103 +331,6 @@ Figure 6B might be the result of
The 'polar-origin' property sets a point of origin for polar coordinate system.
348
-
<br><br>
349
-
Not only elements are positioned within the containing block according to the origin but also properties such as display, margin, and padding are affected by the origin. In conventional coordinate system, the origin of coordinate system implicitly set to upper left corner of the containing block. But in polar coordinates, it is general to specify the point of origin as the center point of the containing block. Also, there would be a situation that the other point in the containing block area need to be the origin.
350
-
</p>
351
-
<pre class='propdef'>
352
-
Name: polar-origin
353
-
Applies to: all elements
354
-
Value: <<position>>
355
-
Initial: 50% 50%
356
-
Media: visual
357
-
Inherited: no
358
-
Percentages: Refer to the size of containing block
359
-
Animatable: as <a href="http://www.w3.org/TR/css3-transitions/#animtype-lpcalc">length, percentage, or calc</a>
360
-
</pre>
361
-
<p>
362
-
Where
363
-
<dl>
364
-
<b><position></b> = [
365
-
<br>
366
-
[ left | center | right | top | bottom | <var><percentage></var> | <var><length></var> ]
367
-
<br>
368
-
|
369
-
<br>
370
-
[ left | center | right | <var><percentage></var> | <var><length></var> ]
371
-
<br>
372
-
[ top | center | bottom | <var><percentage></var> | <var><length></var> ]
373
-
<br>
374
-
|
375
-
<br>
376
-
[ center | [ left | right ][ <var><percentage></var> | <var><length></var> ]? ] &&
377
-
<br>
378
-
[ center | [ top | bottom ][ <var><percentage></var> | <var><length></var> ]? ]
379
-
<br>
380
-
]
381
-
</dl>
382
-
383
-
Values are defined as follows:
384
-
385
-
<dl>
386
-
<dt><var><percentage></var></dt>
387
-
<dd>
388
-
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.
389
-
</dd>
390
-
</dl>
391
-
392
-
<dl>
393
-
<dt><var><length></var></dt>
394
-
<dd>
395
-
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.
396
-
</dd>
397
-
</dl>
398
-
399
-
<dl>
400
-
<dt><var>top</var></dt>
401
-
<dd>
402
-
Computes to 0% for the vertical position.
403
-
</dd>
404
-
</dl>
405
-
406
-
<dl>
407
-
<dt><var>right</var></dt>
408
-
<dd>
409
-
Computes to 100% for the horizontal position.
410
-
</dd>
411
-
</dl>
412
-
413
-
<dl>
414
-
<dt><var>bottom</var></dt>
415
-
<dd>
416
-
Computes to 100% for the vertical position.
417
-
</dd>
418
-
</dl>
419
-
420
-
<dl>
421
-
<dt><var>left</var></dt>
422
-
<dd>
423
-
Computes to 0% for the horizontal position.
424
-
</dd>
425
-
</dl>
426
-
427
-
<dl>
428
-
<dt><var>center</var></dt>
429
-
<dd>
430
-
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.
431
-
</dd>
432
-
</dl>
433
-
</p>
434
-
435
-
<p class="issue">
436
-
Between the item and the containing block, which is appropriate for polar-origin value to be referenced of?
437
-
</p>
438
-
<p class="issue">
439
-
As it’s available to specify the point of origin for polar coordinates, properties such as 'margin', 'padding' would work different from the conventional coordinate system. We need different approaches to define those properties which are related to layout.
The 'polar-angle' property specifies the angle from the Y-axis. This property is activated on condition of position: polar.
444
336
<pre class='propdef'>
@@ -548,6 +440,105 @@ One of the profits of polar coordinate system is performance improvement. The si
548
440
<p class="issue">
549
441
By 'polar-distance' property, a position of an element is specified based on the containing block's center. In other way, is the method of positioning elements by the distance based on the edge of the containing block needed?
The 'polar-origin' property sets a point of origin for polar coordinate system.
447
+
<br><br>
448
+
Not only elements are positioned within the containing block according to the origin but also properties such as display, margin, and padding are affected by the origin. In conventional coordinate system, the origin of coordinate system implicitly set to upper left corner of the containing block. But in polar coordinates, it is general to specify the point of origin as the center point of the containing block. Also, there would be a situation that the other point in the containing block area need to be the origin.
449
+
</p>
450
+
<pre class='propdef'>
451
+
Name: polar-origin
452
+
Applies to: all elements
453
+
Value: <<position>>
454
+
Initial: 50% 50%
455
+
Media: visual
456
+
Inherited: no
457
+
Percentages: Refer to the size of containing block
458
+
Animatable: as <a href="http://www.w3.org/TR/css3-transitions/#animtype-lpcalc">length, percentage, or calc</a>
459
+
</pre>
460
+
<p>
461
+
Where
462
+
<dl>
463
+
<b><position></b> = [
464
+
<br>
465
+
[ left | center | right | top | bottom | <var><percentage></var> | <var><length></var> ]
466
+
<br>
467
+
|
468
+
<br>
469
+
[ left | center | right | <var><percentage></var> | <var><length></var> ]
470
+
<br>
471
+
[ top | center | bottom | <var><percentage></var> | <var><length></var> ]
472
+
<br>
473
+
|
474
+
<br>
475
+
[ center | [ left | right ][ <var><percentage></var> | <var><length></var> ]? ] &&
476
+
<br>
477
+
[ center | [ top | bottom ][ <var><percentage></var> | <var><length></var> ]? ]
478
+
<br>
479
+
]
480
+
</dl>
481
+
482
+
Values are defined as follows:
483
+
484
+
<dl>
485
+
<dt><var><percentage></var></dt>
486
+
<dd>
487
+
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.
488
+
</dd>
489
+
</dl>
490
+
491
+
<dl>
492
+
<dt><var><length></var></dt>
493
+
<dd>
494
+
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.
495
+
</dd>
496
+
</dl>
497
+
498
+
<dl>
499
+
<dt><var>top</var></dt>
500
+
<dd>
501
+
Computes to 0% for the vertical position.
502
+
</dd>
503
+
</dl>
504
+
505
+
<dl>
506
+
<dt><var>right</var></dt>
507
+
<dd>
508
+
Computes to 100% for the horizontal position.
509
+
</dd>
510
+
</dl>
511
+
512
+
<dl>
513
+
<dt><var>bottom</var></dt>
514
+
<dd>
515
+
Computes to 100% for the vertical position.
516
+
</dd>
517
+
</dl>
518
+
519
+
<dl>
520
+
<dt><var>left</var></dt>
521
+
<dd>
522
+
Computes to 0% for the horizontal position.
523
+
</dd>
524
+
</dl>
525
+
526
+
<dl>
527
+
<dt><var>center</var></dt>
528
+
<dd>
529
+
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.
530
+
</dd>
531
+
</dl>
532
+
</p>
533
+
534
+
<p class="issue">
535
+
Between the item and the containing block, which is appropriate for polar-origin value to be referenced of?
536
+
</p>
537
+
<p class="issue">
538
+
As it’s available to specify the point of origin for polar coordinates, properties such as 'margin', 'padding' would work different from the conventional coordinate system. We need different approaches to define those properties which are related to layout.
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.
0 commit comments