-
Notifications
You must be signed in to change notification settings - Fork 790
Expand file tree
/
Copy pathOverview.html
More file actions
executable file
·1144 lines (1137 loc) · 81.8 KB
/
Overview.html
File metadata and controls
executable file
·1144 lines (1137 loc) · 81.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html><html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>CSS Round Display Level 1</title>
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="exploring" name="csswg-work-status">
<meta content="ED" name="w3c-status">
<link href="../default.css" rel="stylesheet" type="text/css">
<link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
<style>
body {
background: url("https://www.w3.org/StyleSheets/TR/logo-ED") top left no-repeat white;
background-attachment: fixed;
color: black;
font-family: sans-serif;
margin: 0 auto;
max-width: 50em;
padding: 2em 1em 2em 70px;
}
:link { color: #00C; background: transparent }
:visited { color: #609; background: transparent }
a[href]:active { color: #C00; background: transparent }
a[href]:hover { background: #ffa }
a[href] img { border-style: none }
h1, h2, h3, h4, h5, h6 { text-align: left }
h1, h2, h3 { color: #005A9C; }
h1 { font: 170% sans-serif }
h2 { font: 140% sans-serif }
h3 { font: 120% sans-serif }
h4 { font: bold 100% sans-serif }
h5 { font: italic 100% sans-serif }
h6 { font: small-caps 100% sans-serif }
.hide { display: none }
div.head { margin-bottom: 1em }
div.head h1 { margin-top: 2em; clear: both }
div.head table { margin-left: 2em; margin-top: 2em }
p.copyright { font-size: small }
p.copyright small { font-size: small }
pre { margin-left: 2em }
dt { font-weight: bold }
ul.toc, ol.toc {
list-style: none;
}
</style>
<meta content="Bikeshed 1.0.0" name="generator">
</head>
<body class="h-entry">
<div class="head">
<p data-fill-with="logo"><a class="logo" href="http://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/Icons/w3c_home" width="72"> </a> </p>
<h1 class="p-name no-ref" id="title">CSS Round Display Level 1</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2015-11-20">20 November 2015</time></span></h2>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
<dd><a class="u-url" href="https://drafts.csswg.org/css-round-display/">https://drafts.csswg.org/css-round-display/</a>
<dt>Latest version:
<dd><a href="http://www.w3.org/TR/css-round-display-1/">http://www.w3.org/TR/css-round-display-1/</a>
<dt>Previous Versions:
<dd><a href="http://www.w3.org/TR/2015/WD-css-round-display-1-20150922/" rel="previous">http://www.w3.org/TR/2015/WD-css-round-display-1-20150922/</a>
<dt>Feedback:
<dd><span><a href="mailto:www-style@w3.org?subject=%5Bcss-round-display%5D%20YOUR%20TOPIC%20HERE">www-style@w3.org</a> with subject line “<kbd>[css-round-display] <i data-lt="">… message topic …</i></kbd>” (<a href="http://lists.w3.org/Archives/Public/www-style/" rel="discussion">archives</a>)</span>
<dt>Issue Tracking:
<dd><a href="#issues-index">Inline In Spec</a>
<dt class="editor">Editors:
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:hyojin22.song@lge.com">Hyojin Song</a> (<span class="p-org org">LG Electronics</span>)
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:jh.hong@lge.com">Jihye Hong</a> (<span class="p-org org">LG Electronics</span>)
<dt class="editor">Former Editor:
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:soonbo.han@lge.com">Soonbo Han</a> (<span class="p-org org">LG Electronics</span>)
</dl>
</div>
<div data-fill-with="warning"></div>
<p class="copyright" data-fill-with="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2015 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply. </p>
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
<div class="p-summary" data-fill-with="abstract">
<p>This document describes CSS extensions to support a round display. It extends existing CSS features including Media Queries<a data-link-type="biblio" href="#biblio-mediaqueries-4">[MEDIAQUERIES-4]</a>, CSS Shapes<a data-link-type="biblio" href="#biblio-css-shapes-1">[CSS-SHAPES-1]</a>, Borders<a data-link-type="biblio" href="#biblio-css3-border">[CSS3-BORDER]</a>, and Positioned Layout<a data-link-type="biblio" href="#biblio-css3-positioning">[CSS3-POSITIONING]</a>. The extensions will help web authors to build a web page suitable for a round display.</p>
<a href="http://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, in speech, etc.
</div>
<h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
<div data-fill-with="status">
<p> This is a public copy of the editors’ draft.
It is provided for discussion only and may change at any moment.
Its publication here does not imply endorsement of its contents by W3C.
Don’t cite this document other than as work in progress. </p>
<p> The (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public mailing list <a href="mailto:www-style@w3.org?Subject=%5Bcss-round-display%5D%20PUT%20SUBJECT%20HERE">www-style@w3.org</a> (see <a href="http://www.w3.org/Mail/Request">instructions</a>)
is preferred for discussion of this specification.
When sending e-mail,
please put the text “css-round-display” in the subject,
preferably like this:
“[css-round-display] <em>…summary of comment…</em>” </p>
<p> This document was produced by the <a href="http://www.w3.org/Style/CSS/members">CSS Working Group</a> (part of the <a href="http://www.w3.org/Style/">Style Activity</a>). </p>
<p> This document was produced by a group operating under
the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>.
W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/32061/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group;
that page also includes instructions for disclosing a patent.
An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>. </p>
<p> This document is governed by the <a href="http://www.w3.org/2015/Process-20150901/" id="w3c_process_revision">1 September 2015 W3C Process Document</a>. </p>
<p></p>
</div>
<div data-fill-with="at-risk"></div>
<h2 class="no-num no-toc no-ref heading settled" id="contents"><span class="content">Table of Contents</span></h2>
<div data-fill-with="table-of-contents" role="navigation">
<ul class="toc" role="directory">
<li><a href="#introduction"><span class="secno">1</span> <span class="content">Introduction</span></a>
<li><a href="#terminology"><span class="secno">2</span> <span class="content">Terminology</span></a>
<li>
<a href="#extending-media-queries"><span class="secno">3</span> <span class="content">Extending Media Queries for a round display</span></a>
<ul class="toc">
<li><a href="#device-radius-media-feature"><span class="secno">3.1</span> <span class="content">The <span class="property">device-radius</span> media feature</span></a>
</ul>
<li>
<a href="#aligning-content"><span class="secno">4</span> <span class="content">Aligning content along the display border</span></a>
<ul class="toc">
<li><a href="#shape-inside-property"><span class="secno">4.1</span> <span class="content">The <span class="property">shape-inside</span> property</span></a>
</ul>
<li>
<a href="#drawing-borders"><span class="secno">5</span> <span class="content">Drawing borders around the display border</span></a>
<ul class="toc">
<li><a href="#border-boundary-property"><span class="secno">5.1</span> <span class="content">The <span class="property">border-boundary</span> property</span></a>
</ul>
<li>
<a href="#positioning-content"><span class="secno">6</span> <span class="content">Content positioning using polar coordinate system</span></a>
<ul class="toc">
<li><a href="#position-property"><span class="secno">6.1</span> <span class="content">The <span class="property">position</span> property</span></a>
<li><a href="#polar-origin-property"><span class="secno">6.2</span> <span class="content">The <span class="property">polar-origin</span> property</span></a>
<li><a href="#polar-angle-property"><span class="secno">6.3</span> <span class="content">The <span class="property">polar-angle</span> property</span></a>
<li><a href="#polar-distance-property"><span class="secno">6.4</span> <span class="content">The <span class="property">polar-distance</span> property</span></a>
<li><a href="#polar-anchor-property"><span class="secno">6.5</span> <span class="content">The <span class="property">polar-anchor</span> property</span></a>
<li><a href="#2d-rotation-transform-function"><span class="secno">6.6</span> <span class="content">2D Rotation Transform Function for self-rotating elements in polar coordinates</span></a>
</ul>
<li>
<a href="#conformance"><span class="secno"></span> <span class="content"> Conformance</span></a>
<ul class="toc">
<li><a href="#document-conventions"><span clas
2ACE
s="secno"></span> <span class="content"> Document conventions</span></a>
<li><a href="#conform-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a>
<li>
<a href="#conform-responsible"><span class="secno"></span> <span class="content"> Requirements for Responsible Implementation of CSS</span></a>
<ul class="toc">
<li><a href="#conform-partial"><span class="secno"></span> <span class="content"> Partial Implementations</span></a>
<li><a href="#conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a>
<li><a href="#conform-testing"><span class="secno"></span> <span class="content"> Implementations of CR-level Features</span></a>
</ul>
</ul>
<li>
<a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
<ul class="toc">
<li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
<li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
</ul>
<li>
<a href="#references"><span class="secno"></span> <span class="content">References</span></a>
<ul class="toc">
<li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
<li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
</ul>
<li>
<a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
<ul class="toc">
<li><a href="#media-descriptor-table"><span class="secno"></span> <span class="content"><span>@media</span> Descriptors</span></a>
</ul>
<li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
</ul>
</div>
<main>
<h2 class="heading settled" data-level="1" id="introduction"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#introduction"></a></h2>
<p> Everything on the web is a rectangle. For example, the window content area in a web browser is a rectangle. Each HTML element follows the W3C box model and thus is also a rectangle. New devices with a round display are now emerging. The current web standards lack some features to support the devices as follows: </p>
<ol>
<li>Lack of the capability to detect a round display
<li>Lack of layout mechanisms suitable for a round display
</ol>
In order to facilitate the use of the web on a round display, we need to rethink existing CSS features.
<p></p>
<p> Current user agents are not capable of detecting the shape of a display so that authors cannot apply various layouts for a round display. To resolve the issue, we add the <a class="property" data-link-type="propdesc" href="#descdef-media-device-radius">device-radius</a> media feature to Media Queries. The feature informs the web page of the property regarding the shape of the display. </p>
<p> To apply the shape of a display to content area, we extend the <a class="property" data-link-type="propdesc" href="#propdef-shape-inside">shape-inside</a> property of CSS Shapes. We also add the <a class="property" data-link-type="propdesc" href="#propdef-border-boundary">border-boundary</a> property to CSS Borders and introduce polar positioning for a better web design suitable for a round display. </p>
<h2 class="heading settled" data-level="2" id="terminology"><span class="secno">2. </span><span class="content">Terminology</span><a class="self-link" href="#terminology"></a></h2>
This specification follows the CSS property definition conventions from <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>. <br> The detailed description of Media Queries is defined in <a data-link-type="biblio" href="#biblio-mediaqueries-4">[MEDIAQUERIES-4]</a><br> The detailed description of CSS Shapes is defined in <a data-link-type="biblio" href="#biblio-css-shapes-1">[CSS-SHAPES-1]</a><br> The detailed description of Borders is defined in <a data-link-type="biblio" href="#biblio-css3-border">[CSS3-BORDER]</a><br> The detailed description of Positioned Layout is defined in <a data-link-type="biblio" href="#biblio-css3-positioning">[CSS3-POSITIONING]</a><br>
<h2 class="heading settled" data-level="3" id="extending-media-queries"><span class="secno">3. </span><span class="content">Extending Media Queries for a round display</span><a class="self-link" href="#extending-media-queries"></a></h2>
<p> Media Queries <a data-link-type="biblio" href="#biblio-mediaqueries-4">[MEDIAQUERIES-4]</a> define mechanisms to support media-dependent style sheets, tailored for different environments. We propose to extend Media Queries by adding the <a class="property" data-link-type="propdesc" href="#descdef-media-device-radius">device-radius</a> media feature to support a round display. This will allow web authors to apply different styles to a web page on the rounded display. </p>
<section>
<h3 class="heading settled" data-level="3.1" id="device-radius-media-feature"><span class="secno">3.1. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#descdef-media-device-radius">device-radius</a> media feature</span><a class="self-link" href="#device-radius-media-feature"></a></h3>
To use different style sheets for a rectangle display and for a round display, media queries should support some properties to identify the display shape. The <a class="property" data-link-type="propdesc" href="#descdef-media-device-radius">device-radius</a> media feature describes the property of rounded borders of a display.
<div class="example" id="example-6156c0ea">
<a class="self-link" href="#example-6156c0ea"></a> This media query indicates that different style sheets will be applied depending on the display shape.
<pre><link media="screen and (device-radius: 0%)" rel="stylesheet" href="rectangle.css" />
<link media="screen and (device-radius: 50%)" rel="stylesheet" href="round.css" />
</pre>
<p> By the mechanism of media queries, if the value of the <a class="property" data-link-type="propdesc" href="#descdef-media-device-radius">device-radius</a> media feature is less than 50%, '<code>rectangle.css</code>' is applied. If it is 50%, '<code>round.css</code>' is applied. </p>
</div>
<p>As in the '<code>border-radius</code>' property, the <a class="property" data-link-type="propdesc" href="#descdef-media-device-radius">device-radius</a> media feature can describe various round shapes of displays, such as rectangle, regular circle, ellipse, and rectangle with round corners. </p>
<table class="definition descdef mq">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-for="@media" data-dfn-type="descriptor" data-export="" id="descdef-media-device-radius">device-radius<a class="self-link" href="#descdef-media-device-radius"></a></dfn>
<tr>
<th>For:
<td><a class="css" data-link-type="at-rule" href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media">@media</a>
<tr>
<th>Value:
<td class="prod">[ <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value"><length></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#percentage-value"><percentage></a> ]
<tr>
<th>Percentage:
<td>Refer to corresponding dimension of the display
<tr>
<th>Type:
<td>range
</table>
<p class="note" role="note"> Note: To define a '<code>range</code>' type media feature, the feature may be written as a normal media feature, but with a '<code>min-</code>' or '<code>max-</code>' prefix on the feature name. '<code>min-</code>' or '<code>max-</code>' prefixes express 'greater or equal to' or 'smaller or equal to' constraints respectively. </p>
<p> The length or percentage value of the '<code>device-radius</code>' property defines a radius of a quarter ellipse in terms of the shape of the corner of the outer screen edge (This is similar to the '<code>border-radius</code>' property. See the <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-backgrounds-3/#border-radius">border-radius</a> description). If the length is zero, the shape of screen is a rectangle, otherwise it is a rectangle with rounded corners or a circle or an ellipse. A percentage value of the '<code>device-radius</code>' is proportional to a width and a height of the screen, which have relevance to a horizontal radius and a vertical radius of the screen according to the length of width and height of the screen each. If the screen shape is the regular circle, '<code>device-radius</code>': 50% has a true value since a half of the width(=height) of the regular circle is the radius of the screen shape. In case of an ellipse with 200x100, '<code>device-radius</code>': 50% means that horizontal-radius of the screen is 100px and vertical-radius of the screen is 50px. It can’t be described in length, not percentage. A negative value is not allowed. </p>
<div class="example" id="example-41805732">
<a class="self-link" href="#example-41805732"></a> The example below shows how a web page looks in the different shapes of displays. This is a simple clock written in HTML. (without <a class="property" data-link-type="propdesc" href="#descdef-media-device-radius">device-radius</a>)
<pre><!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="rectangle.css" />
</head>
<body>
<div id="clockLayer">
<div id="clockLayer">
<div id="date">2015/02/28 (SAT)</div>
<div id="time">10:11</div>
<div id="weather"><img src="cloudy.png" /></div>
</div>
</div>
</body>
</html>
</pre>
<div style="width: 700px; height: 380px; text-align:center">
<div style="float: left; width: 350px;">
<img alt="An image of a rectangle clock within a rectangle display" src="images/device_radius_clock_a.png">
<p>(A) Rectangle Display</p>
</div>
<div style="float: left; ">
<img alt="An image of a round clock within a rectangle display" src="images/device_radius_clock_b.png">
<p>(B) Round Display</p>
</div>
</div>
<div style="width: 700px">
<p class="caption">Devices where the <a class="property" data-link-type="propdesc" href="#descdef-media-device-radius">device-radius</a> media feature is not applicable</p>
</div>
On the other hand, the example below shows how the <a class="property" data-link-type="propdesc" href="#descdef-media-device-radius">device-radius</a> media feature works in the different shapes of displays. This is the same as the code above except for media queries usage. The <a class="property" data-link-type="propdesc" href="#descdef-media-device-radius">device-radius</a> media feature can be used as follows:
<pre><!-- index.html -->
<head>
<link media="screen and (device-radius: 0%)" rel="stylesheet" href="rectangle.css" />
<link media="screen and (device-radius: 50%)" rel="stylesheet" href="round.css" />
</head>
</pre>
<p>If this example code is loaded in a regular round display, '<code>round.css</code>' will be applied by the media queries mechanism. To render the clock properly, '<code>round.css</code>' could be written as follows.</p>
<pre>#clockLayer {
border-radius: 50%;
}
#clockInset {
border-radius: 50%;
}
#date {
text-align: center;
}
...
</pre>
<div style="width: 700px; height: 380px; text-align:center">
<div style="float: left; width: 350px;">
<img alt="An image of a rectangle clock within a rectangle display" src="images/device_radius_clock_a.png">
<p>(A) Rectangle Display<br>(w/ <code>device-radius: 0%</code>)</p>
</div>
<div style="float: left; ">
<img alt="An image of a round clock within a round display" src="images/device_radius_clock_c.png">
<p>(B) Round Display<br>(w/ <code>device-radius: 50%</code>)</p>
</div>
</div>
<div style="width: 700px">
<p class="caption">Devices where the <a class="property" data-link-type="propdesc" href="#descdef-media-device-radius">device-radius</a> media feature is applicable</p>
</div>
</div>
<p class="note" role="note">Note: For other shapes, such as polygons, we need to extend the media features with additional parameters. The current features have limitations to support the diversity beyond round shapes. How can we express star-shaped polygons? (e.g. SVG syntax, etc.) Of course, there is a trade-off between simplicity and expressiveness. </p>
<p class="issue" id="issue-08465960"><a class="self-link" href="#issue-08465960"></a> Using <a class="property" data-link-type="propdesc" href="#descdef-media-device-radius">device-radius</a> with just a single value (e.g. device-radius: 50%) is enough (for simplicity)? Otherwise, do we need to support all possible values the same as <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-backgrounds-3/#border-radius">border-radius</a>? </p>
<h2 class="heading settled" data-level="4" id="aligning-content"><span class="secno">4. </span><span class="content">Aligning content along the display border</span><a class="self-link" href="#aligning-content"></a></h2>
<h3 class="heading settled" data-level="4.1" id="shape-inside-property"><span class="secno">4.1. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-shape-inside">shape-inside</a> property</span><a class="self-link" href="#shape-inside-property"></a></h3>
<p> CSS Shapes <a data-link-type="biblio" href="#biblio-css-shapes">[CSS-SHAPES]</a> define the <a class="property" data-link-type="propdesc" href="#propdef-shape-inside">shape-inside</a> property that aligns contents along the edge of a possibly non-rectangular wrapping area. Web authors may use this feature to fit contents inside a round display. However, it can be challenging to specify the wrapping area to be identical to the shape of a display. To address such cases, <a class="property" data-link-type="propdesc" href="#propdef-shape-inside">shape-inside</a> is extended with a new value named '<code>display</code>', such an element having this value will have its content (or contained elements) aligned along the display border automatically. </p>
<table class="definition propdef" data-link-for-hint="shape-inside">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-shape-inside">shape-inside<a class="self-link" href="#propdef-shape-inside"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod">auto <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> outside-shape <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> [ <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-shapes-2/#typedef-basic-shape"><basic-shape></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-any">||</a> shape-box ] <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-images-3/#typedef-image"><image></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <code>display</code>
<tr>
<th>Initial:
<td>auto
<tr>
<th>Applies to:
<td>block-level elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>n/a
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>computed lengths for <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-shapes-2/#typedef-basic-shape"><basic-shape></a>, the absolute URI for <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css2/syndata.html#value-def-uri"><uri></a>, otherwise as specified
<tr>
<th>Animatable:
<td>as specified for <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-shapes-2/#typedef-basic-shape"><basic-shape></a>, otherwise no
</table>
<p> The example below shows how the <a class="property" data-link-type="propdesc" href="#propdef-shape-inside">shape-inside</a> property works when it is set to '<code>display</code>'. Without using Media Queries, contents can be aligned within the display edge automatically. </p>
<div class="example" id="example-3e199225">
<a class="self-link" href="#example-3e199225"></a>
<pre><style>
#container {
shape-inside: display;
// the same as circle(50% at 50%, 50%) in a regular round display
}
#green-box { float: left; }
#blue-box { float: right; }
</style>
<div id="container">
<p>
Some inline content
<img id="green-box" src="green-box.jpg" />
with a float left and float right, in a
<img id="blue-box" src="blue-box.jpg" />
simple box with a circle shape-inside.
</p>
</div>
</pre>
<p><br></p>
<div style="width: 500px; height: 380px; text-align:center">
<div style="float: left; width: 230px;">
<img alt="A layout of web contents without shape-inside:display" src="images/shape_inside_watch_a.png" style="width: 230px">
<p>(A) Without '<code>shape-inside</code>'</p>
</div>
<div style="float: left; width: 230px;">
<img alt="A layout of web contents with shape-inside: display" src="images/shape_inside_watch_b.png" style="width: 230px">
<p>(B) With '<code>shape-inside: display</code>'</p>
</div>
</div>
<div style="width: 500px">
<p class="caption">Align the content along the display border</p>
</div>
</div>
<p> This property is specially useful for complex shapes (e.g. curved, stelliform, polygonal), that wouldn’t be covered by <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-shapes-2/#typedef-basic-shape"><basic-shape></a> (i.e. circle() or ellipse()), allowing web authors to conveniently align contents with the display edge. </p>
<p> When a containing block is placed on one end of the display and the containing block has 'shape-inside: display', the descendant blocks of the containing block are basically put on the overlapping region between the containing block and the display area. The overlapping region’s shape is mostly complicated shape, so it’s difficult to define the shape using previous method like basic-shape. The figure 4 describes these circumstances as follows. </p>
<div style="width: 500px;">
<img alt="An image of two examples to show the principle of shape-inside: display" src="images/shape_inside_a.png" style="width: 500px">
<p class="caption">Align part of the content along the display border</p>
</div>
<p class="issue" id="issue-8d78506c"><a class="self-link" href="#issue-8d78506c"></a> What if content overflows? Clipping or scrolling? </p>
<h2 class="heading settled" data-level="5" id="drawing-borders"><span class="secno">5. </span><span class="content">Drawing borders around the display border</span><a class="self-link" href="#drawing-borders"></a></h2>
<h3 class="heading settled" data-level="5.1" id="border-boundary-property"><span class="secno">5.1. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-border-boundary">border-boundary</a> property</span><a class="self-link" href="#border-boundary-property"></a></h3>
<p> We add the <a class="property" data-link-type="propdesc" href="#propdef-border-boundary">border-boundary</a> property to set a boundary constraint that affects the borders of an element. </p>
<table class="definition propdef" data-link-for-hint="border-boundary">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-border-boundary">border-boundary<a class="self-link" href="#propdef-border-boundary"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod">none <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> parent <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> display
<tr>
<th>Initial:
<td>none
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>yes
<tr>
<th>Percentages:
<td>n/a
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>as specified
<tr>
<th>Animatable:
<td>no
</table>
<p> When the <a class="property" data-link-type="propdesc" href="#propdef-border-boundary">border-boundary</a> property on an element is set to '<code>parent</code>', additional borders of the element could be drawn where the element’s area and the borders of its parent are met. When it is set to '<code>display</code>', additional borders could be drawn where the element’s area and the borders of screen are met. The default value is '<code>none</code>', imposing no boundary constraint on the borders. </p>
<div class="example" id="example-38a65731">
<a class="self-link" href="#example-38a65731"></a> The example below shows how the <a class="property" data-link-type="propdesc" href="#propdef-border-boundary">border-boundary</a> property works on drawing borders. The result is shown in Figure 5B.
<pre><style>
#container {
border-boundary: display;
}
#redBox {
border: 5px red solid;
}
#greenBox {
border: 5px green solid;
}
#blueBox {
border: 5px blue solid;
}
</style>
<div id="container">
<div id="redBox"></div>
<div id="greenBox"></div>
<div id="blueBox"></div>
</div>
</pre>
<p><br></p>
<div style="width: 600px; text-align:center">
<div style="float: left; width: 300px;">
<img alt="An image of circle drawing border lines without border-boundary: display" src="images/border_boundary_a.png" style="width: 200px">
<p>(A) Without '<code>border-boundary</code>'</p>
</div>
<div style="float: left; width: 300px;">
<img alt="An image of circle drawing border lines with border-boundary: display" src="images/border_boundary_b.png" style="width: 200px">
<p>(B) With '<code>border-boundary: display</code>'</p>
</div>
</div>
<div style="width: 600px">
<p class="caption">Align the content along the display border</p>
</div>
</div>
<p class="note" role="note">Note: If the value of <a class="property" data-link-type="propdesc" href="#propdef-border-boundary">border-boundary</a> is parent or display, border lines of the element are actually just a visual effect. It triggers a layout for rendering in a general way, but in the above cases (border-boundary: parent|display), the layout doesn’t occur and it only draws the border lines inward from the containing block’s borders. With this situation, the borders might hide contents around the display edge. </p>
<h2 class="heading settled" data-level="6" id="positioning-content"><span class="secno">6. </span><span class="content">Content positioning using polar coordinate system</span><a class="self-link" href="#positioning-content"></a></h2>
<p> 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. </p>
<p>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.</p>
<p>We add '<code>polar</code>' to the value of the <a class="property" data-link-type="propdesc" href="#propdef-position">position</a> property to support the polar coordinates of an element itself. The <a class="property" data-link-type="propdesc" href="#propdef-polar-angle">polar-angle</a> and <a class="property" data-link-type="propdesc" href="#propdef-polar-distance">polar-distance</a> properties specify the position of an element.</p>
<p></p>
<p class="note" role="note"> 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 <a class="property" data-link-type="propdesc" href="#propdef-polar-angle">polar-angle</a> 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 <a class="property" data-link-type="propdesc" href="#propdef-polar-angle">polar-angle</a> works the same way in <a data-link-type="biblio" href="#biblio-css-values">[CSS-VALUES]</a>, <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#angle-value"><angle></a> value. </p>
<h3 class="heading settled" data-level="6.1" id="position-property"><span class="secno">6.1. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-position">position</a> property</span><a class="self-link" href="#position-property"></a></h3>
When the <a class="property" data-link-type="propdesc" href="#propdef-position">position</a> property on an element is set to '<code>polar</code>', the element could be affected in polar coordinate system.
<table class="definition pr
8096
opdef" data-link-for-hint="position">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-position">position<a class="self-link" href="#propdef-position"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod">static <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> relative <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> absolute <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> sticky <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> fixed <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <code>polar</code>
<tr>
<th>Initial:
<td>static
<tr>
<th>Applies to:
<td>all elements except table-column-group and table-column
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>specified value
<tr>
<th>Animatable:
<td>no
</table>
<p class="note" role="note"> 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>'. </p>
<p> 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. </p>
<p>An example as below shows the difference between the conventional coordinates and the polar coordinates when positioning elements.</p>
<p></p>
<div class="example" id="example-550a9cf5">
<a class="self-link" href="#example-550a9cf5"></a> The codes below show the difference between conventional coordinate system in the web and polar coordinate system when positioning elements.
<p>Figure 6A might be the result of</p>
<pre><body>
<div style="position: absolute; width: 100px; height: 100px; background-color: blue;"></div>
<div style="position: absolute; width: 50px; height: 50px; background-color: green;"></div>
</body>
</pre>
<p>Figure 6B might be the result of</p>
<pre><body>
<div style="position: polar; width: 100px; height: 100px; background-color: blue;"></div>
<div style="position: polar; width: 50px; height: 50px; background-color: green;"></div>
</body>
</pre>
<p><br></p>
<div style="width: 700px; text-align:center">
<div style="float: left; width: 350px;">
<img alt="An image aligning two elements to containing block in the conventional coordinate system" src="images/polar_position_a.png" style="width: 300px">
<p>(A) With 'position: <code>absolute</code>'</p>
</div>
<div style="float: left; width: 350px; ">
<img alt="An image aligning two elements to containing block in the polar coordinate system" src="images/polar_position_b.png" style="width: 300px">
<p>(B) With 'position: <code>polar</code>'</p>
</div>
</div>
<div style="width: 700px">
<p class="caption">Positioning elements in conventional coordinate system and polar coordinate system</p>
</div>
</div>
<h3 class="heading settled" data-level="6.2" id="polar-origin-property"><span class="secno">6.2. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-polar-origin">polar-origin</a> property</span><a class="self-link" href="#polar-origin-property"></a></h3>
<p> The <a class="property" data-link-type="propdesc" href="#propdef-polar-origin">polar-origin</a> property sets a point of origin for polar coordinate system. <br><br> 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. </p>
<table class="definition propdef" data-link-for-hint="polar-origin">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-polar-origin">polar-origin<a class="self-link" href="#propdef-polar-origin"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-backgrounds-3/#position"><position></a>
<tr>
<th>Initial:
<td>50% 50%
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>Refer to the size of containing block
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>as specified
<tr>
<th>Animatable:
<td>as <a href="http://www.w3.org/TR/css3-transitions/#animtype-lpcalc">length, percentage, or calc</a>
</table>
<p> Where </p>
<dl> <b><position></b> = [ <br> [ left | center | right | top | bottom | <var><percentage></var> | <var><length></var> ] <br> | <br> [ left | center | right | <var><percentage></var> | <var><length></var> ] <br> [ top | center | bottom | <var><percentage></var> | <var><length></var> ] <br> | <br> [ center | [ left | right ] [ <var><percentage></var> | <var><length></var> ]? ] && <br> [ center | [ top | bottom ] [ <var><percentage></var> | <var><length></var> ]? ] <br> ] </dl>
<p>Values are defined as follows:</p>
<dl>
<dt><var><percentage></var>
<dd> 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.
</dl>
<dl>
<dt><var><length></var>
<dd> 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.
</dl>
<dl>
<dt><var>top</var>
<dd> Computes to 0% for the vertical position.
</dl>
<dl>
<dt><var>right</var>
<dd> Computes to 100% for the horizontal position.
</dl>
<dl>
<dt><var>bottom</var>
<dd> Computes to 100% for the vertical position.
</dl>
<dl>
<dt><var>left</var>
<dd> Computes to 0% for the horizontal position.
</dl>
<dl>
<dt><var>center</var>
<dd> 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.
</dl>
<p></p>
<p class="issue" id="issue-39a264ca"><a class="self-link" href="#issue-39a264ca"></a> Between the item and the containing block, which is appropriate for polar-origin value to be referenced of? </p>
<p class="issue" id="issue-e8940ab4"><a class="self-link" href="#issue-e8940ab4"></a> As it’s available to specify the point of origin for polar coordinates, properties such as <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/box.html#propdef-margin">margin</a>, <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/box.html#propdef-padding">padding</a> would work different from the conventional coordinate system. We need different approaches to define those properties which are related to layout. </p>
<h3 class="heading settled" data-level="6.3" id="polar-angle-property"><span class="secno">6.3. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-polar-angle">polar-angle</a> property</span><a class="self-link" href="#polar-angle-property"></a></h3>
The <a class="property" data-link-type="propdesc" href="#propdef-polar-angle">polar-angle</a> property specifies the angle from the Y-axis. This property is activated on condition of position: polar.
<table class="definition propdef" data-link-for-hint="polar-angle">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-polar-angle">polar-angle<a class="self-link" href="#propdef-polar-angle"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#angle-value"><angle></a>
<tr>
<th>Initial:
<td>0
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>as specified
<tr>
<th>Animatable:
<td>as <a href="http://www.w3.org/TR/css3-transitions/#animatable-types">angle</a>
</table>
<h3 class="heading settled" data-level="6.4" id="polar-distance-property"><span class="secno">6.4. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-polar-distance">polar-distance</a> property</span><a class="self-link" href="#polar-distance-property"></a></h3>
The <a class="property" data-link-type="propdesc" href="#propdef-polar-distance">polar-distance</a> property determines how far elements are positioned from the origin of polar coordinates. This property is activated on condition of position: polar.
<table class="definition propdef" data-link-for-hint="polar-distance">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-polar-distance">polar-distance<a class="self-link" href="#propdef-polar-distance"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod">[ <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value"><length></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#percentage-value"><percentage></a> ] && contain<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a>
<tr>
<th>Initial:
<td>0
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>relative to distance from the origin of polar coordinates to edge of containing block
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>as specified
<tr>
<th>Animatable:
<td>as <a href="http://www.w3.org/TR/css3-transitions/#animtype-lpcalc">length, percentage, or calc</a>
</table>
<p> The <code><a class="property" data-link-type="propdesc" href="#propdef-polar-distance">polar-distance</a></code> specifies the distance between the origin of polar coordinates and the anchor point of the element. </p>
<p><br> Values have the following meanings:</p>
<dl>
<dt><var><length></var>
<dd> A length value gives a fixed length between the origin of polar coordinates and the anchor point of element.
</dl>
<dl>
<dt><var><percentage></var>
<dd> A percentage is relative to the distance from a point of contact which is made by the edge of containing block’s shape and the gradient-line to the origin of polar coordinates. The starting point of the gradient-line is the origin of polar coordinates. And the value of the gradient of the line is polar angle value.
</dl>
<dl>
<dt><var>contain</var>
<dd> Adjust polar-distance value of the positioned element which overflows shape of the containing block.
The main purpose of this value is avoiding overflow when positioning elements.
When overflowing occurs, the distance between the point of origin of polar coordinates and the anchor point of the element is reduced,
until there are 2 contact points or less between edge of shape of containing block and content block of the element.
</dl>
<p></p>
<div class="example" id="example-d6d90baf">
<a class="self-link" href="#example-d6d90baf"></a> Here are some examples.
The first example shows positioning elements with polar-distance not using extent keyword value. Some parts of elements are outside the boundary of the containing block’s shape:
<pre><body>
<div style="position: polar; polar-angle: 45deg; polar-distance: 100%"></div>
<div style="position: polar; polar-angle: 180deg; polar-distance: 100%"></div>
</body>
</pre>
<div style="width: 500px; text-align: center"> <img src="images/polar_distance_a.png" style="width: 350px;"> </div>
<p>In the second example, <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css-containment-3/#propdef-contain">contain</a>, the extent keyword value is added to the polar-distance value of each element to avoid overflowing.</p>
<pre><body>
<div style="position: polar; polar-angle: 45deg; polar-distance: 100% contain"></div>
<div style="position: polar; polar-angle: 180deg; polar-distance: 100% contain"></div>
</body>
</pre>
<div style="width: 500px; text-align: center"> <img src="images/polar_distance_b.png" style="width: 350px;"> </div>
</div>
<p class="issue" id="issue-6bae502e"><a class="self-link" href="#issue-6bae502e"></a> Would polar-distance property need auto value? </p>
<div class="example" id="example-40eac4ce">
<a class="self-link" href="#example-40eac4ce"></a> This example shows a way to align elements within the polar coordinate system.
<pre><body>
<div id="circle1" style="position: polar; polar-angle: 0deg; polar-distance: 50%"></div>
<div id="circle2" style="position: polar; polar-angle: 90deg; polar-distance: 20%"></div>
<div id="circle3" style="position: polar; polar-angle: 225deg; polar-distance: 100%"></div>
</body>
</pre>
<div style="width: 400px; text-align: center">
<img alt="An image of three elements positioned to polar coordinates" src="images/polar_a.png" style="width: 200px; border: 1px #AAA solid; text-align: center">
<p class="caption">An example of polar positioning</p>
</div>
</div>
<p class="issue" id="issue-5df272e7"><a class="self-link" href="#issue-5df272e7"></a> How to rotate the element itself with an axis from the element position to the central point of containing block? Is new property needed to support that at one time in polar coordinate system? </p>
<p class="issue" id="issue-8465ee32"><a class="self-link" href="#issue-8465ee32"></a> How to position items to the edge of the containing block without overflowing it? (<i>polar-anchor</i> could be suggested) </p>
<p class="issue" id="issue-1fb69d32"><a class="self-link" href="#issue-1fb69d32"></a> One of the profits of polar coordinate system is performance improvement. The significant performance improvement can be seen in animation using the polar coordinates. How to define animation in the polar coordinates? Is there any difference between the conventional coordinates and the polar coordinates when animate elements? </p>
<p class="issue" id="issue-6e7c10c1"><a class="self-link" href="#issue-6e7c10c1"></a> By <a class="property" data-link-type="propdesc" href="#propdef-polar-distance">polar-distance</a> 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? </p>
<h3 class="heading settled" data-level="6.5" id="polar-anchor-property"><span class="secno">6.5. </span><span class="content">The <a class="property" data-link-type="propdesc" href="#propdef-polar-anchor">polar-anchor</a> property</span><a class="self-link" href="#polar-anchor-property"></a></h3>
<p> The <a class="property" data-link-type="propdesc" href="#propdef-polar-anchor">polar-anchor</a> 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. </p>
<p>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.</p>
<p></p>
<table class="definition propdef" data-link-for-hint="polar-anchor">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-polar-anchor">polar-anchor<a class="self-link" href="#propdef-polar-anchor"></a></dfn>
<tr class="value">
<th>Value:
<td class="prod"><a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-backgrounds-3/#position"><position></a>
<tr>
<th>Initial:
<td>50% 50%
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>relative to width and height of an element
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>as specified
<tr>
<th>Animatable:
<td>as <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-backgrounds-3/#position"><position></a>
</table>
<p> Meanings of some keywords in <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-backgrounds-3/#position"><position></a> are different from those used in <a class="property" data-link-type="propdesc" href="#propdef-polar-origin">polar-origin</a> property. </p>
<dl>
<dt><var><percentage></var>
<dd> 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.
</dl>
<dl>
<dt><var><length></var>
<dd> A length value gives a length offset from the upper left corner of the element’s content area.
</dl>
<p></p>
<p> Only with <a class="property" data-link-type="propdesc" href="#propdef-polar-angle">polar-angle</a> and <a class="property" data-link-type="propdesc" href="#propdef-polar-distance">polar-distance</a> 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 <a class="property" data-link-type="propdesc" href="#propdef-polar-distance">polar-distance</a> value to avoid overflowing when positioning elements in the containing block. </p>
<div class="example" id="example-63817621">
<a class="self-link" href="#example-63817621"></a> This example shows an alignment of four elements with different anchor points positioned in a containing block.
<pre><style>
#item1 {
position: polar;
polar-angle: 45deg;
polar-distance: 100%;
polar-anchor: right top;
}
#item2 {
position: polar;
polar-angle: 135deg;
polar-distance: 100%;
polar-anchor: right bottom;
}
#item3 {
position: polar;
polar-angle: 225deg;
polar-distance: 100%;
polar-anchor: left bottom;
}
#item4 {
position: polar;
polar-angle: 315deg;
polar-distance: 100%;
polar-anchor: left top;
}
</style>
<body>
<div id="item1"></div>
<div id="item2"></div>
<div id="item3"></div>
<div id="item4"></div>
</body>
</pre>
<div style="width: 400px; text-align: center">
<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">
<p class="caption">An example of <a class="property" data-link-type="propdesc" href="#propdef-polar-anchor">polar-anchor</a></p>
</div>
</div>
<p class="issue" id="issue-43dc3773"><a class="self-link" href="#issue-43dc3773"></a> Is '<code>auto</code>' needed for value of <a class="property" data-link-type="propdesc" href="#propdef-polar-anchor">polar-anchor</a>? </p>
<p class="issue" id="issue-9a7a089f"><a class="self-link" href="#issue-9a7a089f"></a> How to solve overflowing when an element has <a class="property" data-link-type="propdesc" href="#propdef-polar-anchor">polar-anchor</a>
356A
; value as '<code>top</code>', <a class="property" data-link-type="propdesc" href="#propdef-polar-angle">polar-angle</a> value is 0deg, and <a class="property" data-link-type="propdesc" href="#propdef-polar-distance">polar-distance</a> is equal to the distance from center to edge of containing block? </p>
<h3 class="heading settled" data-level="6.6" id="2d-rotation-transform-function"><span class="secno">6.6. </span><span class="content">2D Rotation Transform Function for self-rotating elements in polar coordinates</span><a class="self-link" href="#2d-rotation-transform-function"></a></h3>
<p> 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 <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#angle-value"><angle></a> value, the calculation of accurate rotation degree may be omitted. <br><br> The two-dimensional rotation function <code><a href="http://www.w3.org/TR/css3-transforms/#funcdef-rotate">'rotate(<angle>)'</angle></a></code> used in polar coordinates is extended as follows: </p>
<dl>
<dd> <code><a href="http://www.w3.org/TR/css3-transforms/#funcdef-rotate">rotate()</a> = rotate( <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#angle-value"><angle></a> | polar-angle | polar-angle-reverse)</code>
</dl>
Values have the following meanings:
<dl>
<dt><var>polar-angle</var>
<dd> Rotate an element by the value of <a class="property" data-link-type="propdesc" href="#propdef-polar-angle">polar-angle</a> property.
</dl>
<dl>
<dt><var>polar-angle-reverse</var>
<dd> Rotate an element by the angle of the <a class="property" data-link-type="propdesc" href="#propdef-polar-angle">polar-angle</a> property plus 180 degrees.
</dl>
<p></p>
<div class="example" id="example-018a9a82">
<a class="self-link" href="#example-018a9a82"></a> This example shows how the keyword value works in the 2d rotation function.
<pre><style>
#item1 {
position: polar;
polar-angle: 0deg;
polar-distance: 90%;
transform: rotate(polar-angle);
}
#item2 {
position: polar;
polar-angle: 45deg;
polar-distance: 90%;
transform: rotate(polar-angle);
}
#item3 {
position: polar;
polar-angle: 135deg;
polar-distance: 90%;
transform: rotate(polar-angle-reverse);
}
#item4 {
position: polar;
polar-angle: 180deg;
polar-distance: 90%;
transform: rotate(polar-angle-reverse);
}
#item5 {
position: polar;
polar-angle: 225deg;
polar-distance: 90%;
transform: rotate(polar-angle-reverse);
}
#item6 {
position: polar;
polar-angle: -45deg;
polar-distance: 90%;
transform: rotate(polar-angle);
}
</style>
<body>
<div id="item1">1</div>
<div id="item2">2</div>
<div id="item3">3</div>
<div id="item4">4</div>
<div id="item5">5</div>
<div id="item6">6</div>
</body>
</pre>
<div style="width: 500px; text-align: center">
<img alt="An image of extended 2d rotate function" src="images/2d_rotate_function.png" style="width: 250px; text-align: center">
<p class="caption">An example of the extension for 2d rotate function</p>
</div>
</div>
<div class="issue" id="issue-1e8cf7cf"><a class="self-link" href="#issue-1e8cf7cf"></a> If this function is used inside an animation, which event is expected to occur? </div>
</section>
</main>
<h2 class="no-ref no-num heading settled" id="conformance"><span class="content"> Conformance</span><a class="self-link" href="#conformance"></a></h2>
<h3 class="heading settled" id="document-conventions"><span class="content"> Document conventions</span><a class="self-link" href="#document-conventions"></a></h3>
<p>Conformance requirements are expressed with a combination of
descriptive assertions and RFC 2119 terminology. The key words "MUST",
"MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
"RECOMMENDED", "MAY", and "OPTIONAL" in the normative parts of this
document are to be interpreted as described in RFC 2119.
However, for readability, these words do not appear in all uppercase
letters in this specification. </p>
<p>All of the text of this specification is normative except sections
explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119">[RFC2119]</a> </p>
<p>Examples in this specification are introduced with the words "for example"
or are set apart from the normative text with <code>class="example"</code>,
like this: </p>
<div class="example" id="example-52448c84">
<a class="self-link" href="#example-52448c84"></a>
<p>This is an example of an informative example. </p>
</div>
<p>Informative notes begin with the word "Note" and are set apart from the
normative text with <code>class="note"</code>, like this: </p>
<p class="note" role="note">Note, this is an informative note. </p>
<p>Advisements are normative sections styled to evoke special attention and are
set apart from other normative text with <code><strong class="advisement"></code>, like
this: <strong class="advisement"> UAs MUST provide an accessible alternative. </strong> </p>
<h3 class="heading settled" id="conform-classes"><span class="content"> Conformance classes</span><a class="self-link" href="#conform-classes"></a></h3>
<p>Conformance to this specification
is defined for three conformance classes: </p>
<dl>
<dt>style sheet
<dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#style-sheet">CSS
style sheet</a>.
<dt>renderer
<dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that interprets the semantics of a style sheet and renders
documents that use them.
<dt>authoring tool
<dd>A <a href="http://www.w3.org/TR/CSS2/conform.html#user-agent">UA</a> that writes a style sheet.
</dl>
<p>A style sheet is conformant to this specification
if all of its statements that use syntax defined in this module are valid
<
BEC0
div id="LC886" class="react-file-line html-div" data-testid="code-cell" data-line-number="886" style="position:relative"> according to the generic CSS grammar and the individual grammars of each
feature defined in this module. </p>
<p>A renderer is conformant to this specification
if, in addition to interpreting the style sheet as defined by the
appropriate specifications, it supports all the features defined
by this specification by parsing them correctly
and rendering the document accordingly. However, the inability of a
UA to correctly render a document due to limitations of the device
does not make the UA non-conformant. (For example, a UA is not
required to render color on a monochrome monitor.) </p>
<p>An authoring tool is conformant to this specification
if it writes style sheets that are syntactically correct according to the
generic CSS grammar and the individual grammars of each feature in
this module, and meet all other conformance requirements of style sheets
as described in this module. </p>
<h3 class="heading settled" id="conform-responsible"><span class="content"> Requirements for Responsible Implementation of CSS</span><a class="self-link" href="#conform-responsible"></a></h3>
<p>The following sections define several conformance requirements
for implementing CSS responsibly,
in a way that promotes interoperability in the present and future. </p>
<h4 class="heading settled" id="conform-partial"><span class="content"> Partial Implementations</span><a class="self-link" href="#conform-partial"></a></h4>
<p>So that authors can exploit the forward-compatible parsing rules to assign fallback values, <strong>CSS renderers <em>must</em> treat as invalid
(and <a href="http://www.w3.org/TR/CSS2/conform.html#ignore">ignore as appropriate</a>)
any at-rules, properties, property values, keywords, and other syntactic constructs
for which they have no usable level of support</strong>.
In particular, user agents <em>must not</em> selectively ignore
unsupported property values and honor supported values in a single multi-value property declaration:
if any value is considered invalid (as unsupported values must be),
CSS requires that the entire declaration be ignored. </p>
<h4 class="heading settled" id="conform-future-proofing"><span class="content"> Implementations of Unstable and Proprietary Features</span><a class="self-link" href="#conform-future-proofing"></a></h4>
<p>To avoid clashes with future stable CSS features,
the CSSWG recommends <a href="http://www.w3.org/TR/CSS/#future-profing">following best practices</a> for the implementation of <a href="http://www.w3.org/TR/CSS/#unstable">unstable</a> features and <a href="http://www.w3.org/TR/CSS/#proprietary-extension">proprietary extensions</a> to CSS. </p>
<h4 class="heading settled" id="conform-testing"><span class="content"> Implementations of CR-level Features</span><a class="self-link" href="#conform-testing"></a></h4>
<p>Once a specification reaches the Candidate Recommendation stage,
implementers should release an <a data-link-type="dfn" href="#vendor-prefix">unprefixed</a> implementation
of any CR-level feature they can demonstrate
to be correctly implemented according to spec,
and should avoid exposing a prefixed variant of that feature. </p>
<p>To establish and maintain the interoperability of CSS across
implementations, the CSS Working Group requests that non-experimental
CSS renderers submit an implementation report (and, if necessary, the
testcases used for that implementation report) to the W3C before
releasing an unprefixed implementation of any CSS features. Testcases
submitted to W3C are subject to review and correction by the CSS
Working Group. </p>
<p>Further information on submitting testcases and implementation reports
can be found from on the CSS Working Group’s website at <a href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
Questions should be directed to the <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a> mailing list. </p>
<h2 class="no-num heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2>
<h3 class="no-num heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3>
<ul class="indexlist">
<li><a href="#propdef-border-boundary">border-boundary</a><span>, in §5.1</span>
<li><a href="#descdef-media-device-radius">device-radius</a><span>, in §3.1</span>
<li><a href="#propdef-polar-anchor">polar-anchor</a><span>, in §6.5</span>
<li><a href="#propdef-polar-angle">polar-angle</a><span>, in §6.3</span>
<li><a href="#propdef-polar-distance">polar-distance</a><span>, in §6.4</span>
<li><a href="#propdef-polar-origin">polar-origin</a><span>, in §6.2</span>
<li><a href="#propdef-position">position</a><span>, in §6.1</span>
<li><a href="#propdef-shape-inside">shape-inside</a><span>, in §4.1</span>
</ul>
<h3 class="no-num heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
<ul class="indexlist">
<li>
<a data-link-type="biblio" href="#biblio-css-backgrounds-3">[css-backgrounds-3]</a> defines the following terms:
<ul>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#position"><position></a>
<li><a href="https://drafts.csswg.org/css-backgrounds-3/#border-radius">border-radius</a>
</ul>
<li>
<a data-link-type="biblio" href="#biblio-css-conditional-3">[css-conditional-3]</a> defines the following terms:
<ul>
<li><a href="https://drafts.csswg.org/css-conditional-3/#at-ruledef-media">@media</a>
</ul>
<li>
<a data-link-type="biblio" href="#biblio-css-containment-3">[css-containment-3]</a> defines the following terms:
<ul>
<li><a href="https://drafts.csswg.org/css-containment-3/#propdef-contain">contain</a>
</ul>
<li>
<a data-link-type="biblio" href="#biblio-css-images-3">[css-images-3]</a> defines the following terms:
<ul>
<li><a href="https://drafts.csswg.org/css-images-3/#typedef-image"><image></a>
</ul>
<li>
<a data-link-type="biblio" href="#biblio-css-shapes-2">[CSS-SHAPES]</a> defines the following terms:
<ul>
<li><a href="https://drafts.csswg.org/css-shapes-2/#typedef-basic-shape"><basic-shape></a>
</ul>
<li>
<a data-link-type="biblio" href="#biblio-css-values-3">[css-values]</a> defines the following terms:
<ul>
<li><a href="https://drafts.csswg.org/css-values-3/#angle-value"><angle></a>
<li><a href="https://drafts.csswg.org/css-values-3/#length-value"><length></a>
<li><a href="https://drafts.csswg.org/css-values-3/#percentage-value"><percentage></a>
<li><a href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a>
<li><a href="https://drafts.csswg.org/css-values-3/#comb-one">|</a>
<li><a href="https://drafts.csswg.org/css-values-3/#comb-any">||</a>
</ul>
<li>
<a data-link-type="biblio" href="#biblio-css21">[CSS21]</a> defines the following terms:
<ul>
<li><a href="https://drafts.csswg.org/css2/syndata.html#value-def-uri"><uri></a>
<li><a href="https://drafts.csswg.org/css2/box.html#propdef-margin">margin</a>
<li><a href="https://drafts.csswg.org/css2/box.html#propdef-padding">padding</a>
</ul>
</ul>
<h2 class="no-num heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
<h3 class="no-num heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3>
<dl>
<dt id="biblio-css-shapes"><a class="self-link" href="#biblio-css-shapes"></a>[CSS-SHAPES]
<dd>Vincent Hardy; Rossen Atanassov; Alan Stearns. <a href="http://www.w3.org/TR/css-shapes-1/">CSS Shapes Module Level 1</a>. 20 March 2014. CR. URL: <a href="http://www.w3.org/TR/css-shapes-1/">http://www.w3.org/TR/css-shapes-1/</a>
<dt id="biblio-css21"><a class="self-link" href="#biblio-css21"></a>[CSS21]
<dd>Bert Bos; et al. <a href="http://www.w3.org/TR/CSS2">Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</a>. 7 June 2011. REC. URL: <a href="http://www.w3.org/TR/CSS2">http://www.w3.org/TR/CSS2</a>
<dt id="biblio-css-backgrounds-3"><a class="self-link" href="#biblio-css-backgrounds-3"></a>[CSS-BACKGROUNDS-3]
<dd>CSS Backgrounds and Borders Module Level 3 URL: <a href="http://www.w3.org/TR/css3-background/">http://www.w3.org/TR/css3-background/</a>
<dt id="biblio-css-conditional-3"><a class="self-link" href="#biblio-css-conditional-3"></a>[CSS-CONDITIONAL-3]