index.html
168 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
244
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang=en>
<head><meta content="text/html; charset=utf-8" http-equiv=Content-Type>
<title>CSS Writing Modes Module Level 3</title>
<link href=default.css rel=stylesheet type="text/css">
<style type="text/css">
object { vertical-align: middle; }
.sidebar { float: right; background: #eee; border: solid gray; margin: 1em; }
.sidebar .figure { margin: 1em; }
.sidebar object { margin: 0 auto; display: block; }
.figurepair { display: table; margin: 1em auto; }
.figurepair .figure { display: table-cell; }
h2, .example { clear: both; }
.figure img,
.figure object,
.example img,
dd img { max-width: 100%; display: block; margin: 1em auto; }
div.figure table {
margin:auto;
}
</style>
<link href="http://www.w3.org/StyleSheets/TR/W3C-WD.css" rel=stylesheet
type="text/css">
<body>
<div class=head> <!--begin-logo-->
<p><a href="http://www.w3.org/"><img alt=W3C height=48
src="http://www.w3.org/Icons/w3c_home" width=72></a> <!--end-logo-->
<h1>CSS Writing Modes Module Level 3</h1>
<h2 class="no-num no-toc" id=longstatus-date>W3C Working Draft 1 September
2011</h2>
<dl>
<dt>This version:</dt>
<!--
<dd><a href="http://dev.w3.org/csswg/css3-writing-modes/">http://dev.w3.org/csswg/css3-writing-modes/</a>
-->
<dd><a
href="http://www.w3.org/TR/2011/WD-css3-writing-modes-20110901/">http://www.w3.org/TR/2011/WD-css3-writing-modes-20110901/</a>
<dt>Latest version:
<dd><a
href="http://www.w3.org/TR/css3-writing-modes/">http://www.w3.org/TR/css3-writing-modes/</a>
<dt>Latest editor's draft:
<dd><a
href="http://dev.w3.org/csswg/css3-writing-modes/">http://dev.w3.org/csswg/css3-writing-modes/</a>
<dt>Previous version:
<dd><a
href="http://www.w3.org/TR/2011/WD-css3-writing-modes-20110531/">http://www.w3.org/TR/2011/WD-css3-writing-modes-20110531/</a>
<dt>Editors:
<dd><a href="http://fantasai.inkedblade.net/contact">Elika J. Etemad</a>
(Mozilla)
<dd><a href="mailto:kojiishi@gluesoft.co.jp">Koji Ishii</a> (Invited
Expert)
<dd><a href="mailto:murakami@antenna.co.jp">Shinyu Murakami</a> (<a
href="http://www.antenna.co.jp/">Antenna House</a>)
<dt>Previous Editors:
<dd><a href="mailto:paulnel@microsoft.com">Paul Nelson</a> (<a
href="http://www.microsoft.com/">Microsoft</a>)
<dd><a href="mailto:michelsu@microsoft.com">Michel Suignard</a> (<a
href="http://www.microsoft.com/">Microsoft</a>)
</dl>
<!--begin-copyright-->
<p class=copyright><a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
rel=license>Copyright</a> © 2011 <a
href="http://www.w3.org/"><acronym title="World Wide Web
Consortium">W3C</acronym></a><sup>®</sup> (<a
href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute
of Technology">MIT</acronym></a>, <a href="http://www.ercim.eu/"><acronym
title="European Research Consortium for Informatics and
Mathematics">ERCIM</acronym></a>, <a
href="http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. 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>
<!--end-copyright-->
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc" id=abstract> Abstract</h2>
<p>CSS Writing Modes Level 3 defines CSS features to support for various
international writing modes, such as left-to-right (e.g. Latin or Indic),
right-to-left (e.g. Hebrew or Arabic), bidirectional (e.g. mixed Latin and
Arabic) and vertical (e.g. Asian scripts).
<p>Inherently bottom-to-top scripts are not handled in this version. See <a
href="#UTN22" rel=biblioentry>[UTN22]<!--{{UTN22}}--></a> for an
explanation of relevant issues.
<h2 class="no-num no-toc" id=status> Status of this document</h2>
<!--begin-status-->
<p><em>This section describes the status of this document at the time of
its publication. Other documents may supersede this document. A list of
current W3C publications and the latest revision of this technical report
can be found in the <a href="http://www.w3.org/TR/">W3C technical reports
index at http://www.w3.org/TR/.</a></em>
<p>Publication as a Working Draft does not imply endorsement by the W3C
Membership. This is a draft document and may be updated, replaced or
obsoleted by other documents at any time. It is inappropriate to cite this
document as other than work in progress.
<p>The (<a
href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public
mailing list <a href="mailto:www-style@w3.org">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 “css3-writing-modes” in the subject, preferably like
this: “[<!---->css3-writing-modes<!---->] <em>…summary of
comment…</em>”
<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>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>
<!--end-status-->
<p>The following features are at-risk and may be dropped during CR:
<ul>
<li>The ‘<a href="#use-glyph-orientation"><code
class=css>use-glyph-orientation</code></a>’ of ‘<a
href="#text-orientation0"><code
class=property>text-orientation</code></a>’
<li>The ‘<code class=css>ascii-digits</code>’, ‘<code
class=css>digits</code>’, ‘<code
class=css>alpha</code>’, ‘<code
class=css>latin</code>’, and ‘<code
class=css>alphanumeric</code>’ values of ‘<a
href="#text-combine-horizontal0"><code
class=property>text-combine-horizontal</code></a>’.
<li>The ‘<a href="#text-combine-mode0"><code
class=property>text-combine-mode</code></a>’ property
</ul>
<h2 class="no-num no-toc" id=Contents> Table of Contents</h2>
<!--begin-toc-->
<ul class=toc>
<li><a href="#text-flow"><span class=secno>1. </span> Introduction to
Writing Modes</a>
<ul class=toc>
<li><a href="#placement"><span class=secno>1.1. </span> Module
Interactions</a>
<li><a href="#values"><span class=secno>1.2. </span> Values</a>
</ul>
<li><a href="#text-direction"><span class=secno>2. </span> Inline
Direction and Bidirectionality</a>
<ul class=toc>
<li><a href="#direction"><span class=secno>2.1. </span> Specifying
Directionality: the ‘<code class=property>direction</code>’
property</a>
<li><a href="#unicode-bidi"><span class=secno>2.2. </span> Embeddings
and Overrides: the ‘<code
class=property>unicode-bidi</code>’ property</a>
<li><a href="#bidi-example"><span class=secno>2.3. </span> Example of
Bidirectional Text</a>
<li><a href="#bidi-box-model"><span class=secno>2.4. </span> Box model
for inline elements in bidirectional context</a>
</ul>
<li><a href="#vertical-intro"><span class=secno>3. </span> Introduction to
Vertical Text</a>
<ul class=toc>
<li><a href="#writing-mode"><span class=secno>3.1. </span> Block Flow
Direction: the ‘<code class=property>writing-mode</code>’
property</a>
<ul class=toc>
<li><a href="#svg-writing-mode"><span class=secno>3.1.1. </span>
SVG1.1 ‘<code class=property>writing-mode</code>’
Values</a>
</ul>
</ul>
<li><a href="#inline-alignment"><span class=secno>4. </span> Inline-level
Alignment</a>
<ul class=toc>
<li><a href="#intro-baselines"><span class=secno>4.1. </span>
Introduction to Baselines</a>
<li><a href="#text-baselines"><span class=secno>4.2. </span> Text
Baselines</a>
<li><a href="#replaced-baselines"><span class=secno>4.3. </span> Atomic
Inline Baselines</a>
<li><a href="#baseline-alignment"><span class=secno>4.4. </span>
Baseline Alignment</a>
</ul>
<li><a href="#intro-text-layout"><span class=secno>5. </span> Introduction
to Vertical Text Layout</a>
<ul class=toc>
<li><a href="#text-orientation"><span class=secno>5.1. </span> Orienting
Text: the ‘<code class=property>text-orientation</code>’
property</a>
</ul>
<li><a href="#abstract-box"><span class=secno>6. </span> Abstract Box
Terminology</a>
<ul class=toc>
<li><a href="#abstract-dimensions"><span class=secno>6.1. </span>
Logical Dimensions</a>
<li><a href="#abstract-directions"><span class=secno>6.2. </span>
Abstract and Physical Directions</a>
<li><a href="#line-directions"><span class=secno>6.3. </span>
Line-relative Directions</a>
<li><a href="#logical-directions"><span class=secno>6.4. </span>
Flow-relative Directions</a>
<li><a href="#logical-to-physical"><span class=secno>6.5. </span>
Abstract-to-Physical Mappings</a>
</ul>
<li><a href="#abstract-layout"><span class=secno>7. </span> Abstract Box
Layout</a>
<ul class=toc>
<li><a href="#vertical-layout"><span class=secno>7.1. </span> Principles
of Layout in Vertical Writing Modes</a>
<li><a href="#dimension-mapping"><span class=secno>7.2. </span>
Dimensional Mapping</a>
<li><a href="#orthogonal-flows"><span class=secno>7.3. </span>
Orthogonal Flows</a>
<ul class=toc>
<li><a href="#orthogonal-auto"><span class=secno>7.3.1. </span>
Auto-sizing in Orthogonal Flows</a>
<li><a href="#orthogonal-multicol"><span class=secno>7.3.2. </span>
Multi-column Layout in Orthogonal Flows</a>
<li><a href="#orthogonal-pagination"><span class=secno>7.3.3. </span>
Paginating Orthogonal Flows</a>
</ul>
<li><a href="#logical-direction-layout"><span class=secno>7.4. </span>
Flow-Relative Mappings</a>
<li><a href="#line-mappings"><span class=secno>7.5. </span>
Line-Relative Mappings</a>
<li><a href="#physical-only"><span class=secno>7.6. </span> Purely
Physical Mappings</a>
<li><a href="#caption-side"><span class=secno>7.7. </span> Table Caption
Mappings: the ‘<code class=property>caption-side</code>’
keywords</a>
</ul>
<li><a href="#page-direction"><span class=secno>8. </span> Page Flow: the
page progression direction</a>
<li><a href="#text-combine"><span class=secno>9. </span> Glyph
Composition</a>
<ul class=toc>
<li><a href="#text-combine-horizontal"><span class=secno>9.1. </span>
Horizonal-in-Vertical Composition: the ‘<code
class=property>text-combine-horizontal</code>’ property</a>
<li><a href="#text-combine-mode"><span class=secno>9.2. </span>
Horizonal-in-Vertical Glyph Scaling: the ‘<code
class=property>text-combine-mode</code>’ property</a>
</ul>
<li class=no-num><a href="#changes">Changes</a>
<ul class=toc>
<li class=no-num><a href="#recent-changes"> Changes from the May 2011
CSS Writing Modes Module Level 3 <abbr title="Working
Draft">WD</abbr></a>
</ul>
<li><a href="#conformance"><span class=secno>10. </span> Conformance</a>
<ul class=toc>
<li><a href="#conventions"><span class=secno>10.1. </span> Document
Conventions</a>
<li><a href="#conformance-classes"><span class=secno>10.2. </span>
Conformance Classes</a>
<li><a href="#partial"><span class=secno>10.3. </span> Partial
Implementations</a>
<li><a href="#experimental"><span class=secno>10.4. </span> Experimental
Implementations</a>
<li><a href="#testing"><span class=secno>10.5. </span>Non-Experimental
Implementations</a>
<li><a href="#cr-exit-criteria"><span class=secno>10.6. </span> CR Exit
Criteria</a>
</ul>
<li class=no-num><a href="#acknowledgements"> Acknowledgements</a>
<li class=no-num><a href="#character-properties">Appendix A. Characters
and Properties</a>
<li class=no-num><a href="#script-orientations">Appendix B:
Bi-orientational Transformations</a>
<li class=no-num><a href="#vertical-typesetting-details">Appendix C:
Vertical Typesetting Synthesis</a>
<li class=no-num><a href="#intrinsic-sizing">Appendix D: Intrinsic
Dimensions</a>
<ul class=toc>
<li class=no-num><a href="#multicol-intrinsic"> Intrinsic Sizes in
Multi-column Layout</a>
</ul>
<li class=no-num><a href="#bidi-html"> Appendix E: Bidi Rules for HTML</a>
<li class=no-num><a href="#references"> References</a>
<ul class=toc>
<li class=no-num><a href="#normative-references"> Normative
references</a>
<li class=no-num><a href="#other-references"> Other references</a>
</ul>
<li class=no-num><a href="#property-index"> Property Index</a>
</ul>
<!--end-toc-->
<h2 id=text-flow><span class=secno>1. </span> Introduction to Writing Modes</h2>
<p>CSS Writing Modes Level 3 defines CSS features to support for various
international writing modes, such as left-to-right (e.g. Latin or Indic),
right-to-left (e.g. Hebrew or Arabic), bidirectional (e.g. mixed Latin and
Arabic) and vertical (e.g. Asian scripts).
<p>A <dfn id=writing-mode0>writing mode</dfn> in CSS is determined by the
‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’, ‘<a
href="#direction0"><code class=property>direction</code></a>’, and
‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’ properties. It is
defined primarily in terms of its <a
href="#inline-base-direction"><i>inline base direction</i></a> and <a
href="#block-flow-direction"><i>block flow direction</i></a>:
<div class=sidebar>
<div class="figure right"> <a href="diagrams/text-flow-vectors-tb.svg"
type="image/svg+xml"> <img alt="Latin-based writing mode" class=landscape
src="diagrams/text-flow-vectors-tb.png"></a>
<p class=caption>Latin-based writing mode
</div>
<div class="figure left"> <a
href="diagrams/text-flow-vectors-lr-reverse.svg" type="image/svg+xml">
<img alt="Mongolian-based writing mode" class=landscape
src="diagrams/text-flow-vectors-lr-reverse.png"></a>
<p class=caption>Mongolian-based writing mode
</div>
<div class="figure right"> <a href="diagrams/text-flow-vectors-tb.svg"
type="image/svg+xml"> <img alt="Han-based writing mode" class=landscape
src="diagrams/text-flow-vectors-tb.png"></a> <a
href="diagrams/text-flow-vectors-rl.svg" type="image/svg+xml"> <img
alt="Han-based writing mode" class=landscape
src="diagrams/text-flow-vectors-rl.png"></a>
<p class=caption>Han-based writing mode
</div>
</div>
<p>The <dfn id=inline-base-direction>inline base direction</dfn> is the
primary direction in which content is ordered on a line and defines on
which sides the "start" and "end" of a line are. The ‘<a
href="#direction0"><code class=property>direction</code></a>’
property specifies the inline base direction of an element and, together
with the ‘<a href="#unicode-bidi0"><code
class=property>unicode-bidi</code></a>’ property and the inherent
directionality of any text content, determines the ordering of
inline-level content within a line.
<p>The <dfn id=block-flow-direction>block flow direction</dfn> is the
direction in which block-level boxes stack and the direction in which line
boxes stack within a block container. The ‘<a
href="#writing-mode1"><code class=property>writing-mode</code></a>’
property determines the block flow direction.
<p>A <dfn id=horizontal-writing-mode>horizontal writing mode</dfn> is one
with horizontal lines of text, i.e. a downward or upward block flow. A
<dfn id=vertical-writing-mode>vertical writing mode</dfn> is one with
vertical lines of text, i.e. a leftward or rightward block flow.
<p class=note>These terms should not be confused with <dfn
id=vertical-block-flow>vertical block flow</dfn> (which is a downward or
upward block flow) and <dfn id=horizontal-block-flow>horizontal block
flow</dfn> (which is leftward or rightward block flow). To avoid
confusion, CSS specifications avoid this latter set of terms.
<p>Writing systems typically have one or two native writing modes. Some
examples are:
<ul>
<li>Latin-based systems are typically written using a left-to-right inline
direction with a downward (top-to-bottom) block flow direction.
<li>Arabic-based systems are typically written using a right-to-left
inline direction with a downward (top-to-bottom) block flow direction.
<li>Mongolian-based systems are typically written using a top-to-bottom
inline direction with a rightward (left-to-right) block flow direction.
<li>Han-based systems are commonly written using a left-to-right inline
direction with a downward (top-to-bottom) block flow direction,
<strong>or</strong> a top-to-bottom inline direction with a leftward
(right-to-left) block flow direction. Many magazines and newspapers will
mix these two writing modes on the same page.
</ul>
<p>The ‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’ component of the writing
mode determines the <a href="#line-orientation"><i>line
orientation</i></a> and the <i>typesetting mode</i>, and controls details
of text layout such as the <i>glyph orientation</i>.
<p class=note>See Unicode Technical Note #22 <a href="#UTN22"
rel=biblioentry>[UTN22]<!--{{UTN22}}--></a> (<a
href="http://fantasai.inkedblade.net/style/discuss/vertical-text/paper">HTML
version</a>) for a more in-depth introduction to writing modes and
vertical text.
<h3 id=placement><span class=secno>1.1. </span> Module Interactions</h3>
<p>This module replaces and extends the ‘<a
href="#unicode-bidi0"><code class=property>unicode-bidi</code></a>’
and ‘<a href="#direction0"><code
class=property>direction</code></a>’ features defined in <a
href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> sections 8.6
and 9.10.
<h3 id=values><span class=secno>1.2. </span> Values</h3>
<p>This specification follows the <a
href="http://www.w3.org/TR/CSS21/about.html#property-defs">CSS property
definition conventions</a> from <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>. Value types not defined in
this specification are defined in CSS Level 2 Revision 1 <a
href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>. Other CSS
modules may expand the definitions of these value types: for example <a
href="#CSS3COLOR" rel=biblioentry>[CSS3COLOR]<!--{{CSS3COLOR}}--></a>,
when combined with this module, expands the definition of the
<color> value type as used in this specification.
<p>In addition to the property-specific values listed in their definitions,
all properties defined in this specification also accept the <a
href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">inherit</a>
keyword as their property value. For readability it has not been repeated
explicitly.
<h2 id=text-direction><span class=secno>2. </span> Inline Direction and
Bidirectionality</h2>
<p>While the characters in most scripts are written from left to right,
certain scripts are written from right to left. In some documents, in
particular those written with the Arabic or Hebrew script, and in some
mixed-language contexts, text in a single (visually displayed) block may
appear with mixed directionality. This phenomenon is called <span
class=index-def id=bidirectionality title="bidirectionality (bidi)"><dfn
id=bidirectionality0>bidirectionality</dfn></span>, or "bidi" for short.
<div class=figure>
<p><img alt="An example of bidirectional text is a Latin name in an Arabic
sentence. The sentence overall is typeset right-to-left, but the letters
in the Latin word in the middle are typeset left-to-right."
src="diagrams/bidi.png">
<p class=caption>Bidirectionality</p>
</div>
<p>The Unicode standard (<a
href="http://www.unicode.org/reports/tr9/">Unicode Standard Annex #9</a>)
defines a complex algorithm for determining the proper ordering of
bidirectional text. The algorithm consists of an implicit part based on
character properties, as well as explicit controls for embeddings and
overrides. CSS relies on this algorithm to achieve proper bidirectional
rendering. The ‘<a href="#direction0"><code
class=property>direction</code></a>’ and ‘<a
href="#unicode-bidi0"><code class=property>unicode-bidi</code></a>’
properties allow authors to specify how the elements and attributes of a
document language map to this algorithm.
<p>User agents that support bidirectional text must apply the Unicode
bidirectional algorithm to every sequence of inline-level boxes
uninterrupted by a forced (<a
href="http://www.unicode.org/reports/tr9/#Bidirectional_Character_Types">bidi
class B</a>) paragraph break or block boundary. This sequence forms the
<dfn id=paragraph>paragraph</dfn> unit in the bidirectional algorithm.
<p>Except when the ‘<a href="#plaintext"><code
class=css>plaintext</code></a>’ value of ‘<a
href="#unicode-bidi0"><code class=property>unicode-bidi</code></a>’
is in effect, the paragraph embedding level is set according to the value
of the ‘<a href="#direction0"><code
class=property>direction</code></a>’ property of the paragraph's
element rather than by the heuristic given in steps P2 and P3 of the
Unicode algorithm. The paragraph's element is usually the containing
block, but in the case of a paragraph contained by bidi <a
href="#isolate">isolation</a> it is the isolating inline element instead.
<p>Because the base directionality of a text depends on the structure and
semantics of the document, the ‘<a href="#direction0"><code
class=property>direction</code></a>’ and ‘<a
href="#unicode-bidi0"><code class=property>unicode-bidi</code></a>’
properties should in most cases be used only to map bidi information in
the markup to its corresponding CSS styles. If a document language
provides markup features to control bidi, authors and users should use
those features and not specify CSS rules to override them.
<p>The HTML 4 specification (<a href="#HTML401"
rel=biblioentry>[HTML401]<!--{{HTML401}}--></a>, section 8.2) defines
bidirectionality behavior for HTML elements. The HTML 4 specification also
contains more information on bidirectionality issues.
<p class=note>Because HTML UAs can turn off CSS styling, we advise HTML
authors to use the HTML ‘<code class=property>dir</code>’
attribute and <bdo> element to ensure correct bidirectional layout
in the absence of a style sheet.
<h3 id=direction><span class=secno>2.1. </span> Specifying Directionality:
the ‘<a href="#direction0"><code
class=property>direction</code></a>’ property</h3>
<table class=propdef>
<tbody>
<tr>
<th>Name:
<td><dfn id=direction0>direction</dfn>
<tr>
<th>Value:
<td>ltr | rtl
<tr>
<th>Initial:
<td>ltr
<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>specified value
</table>
<p>This property specifies the base directionality of text and elements on
a line, and the directionality of embeddings and overrides (see ‘<a
href="#unicode-bidi0"><code class=property>unicode-bidi</code></a>’)
for the Unicode bidirectional algorithm. In addition, it affects the
ordering of <a href="http://www.w3.org/TR/CSS21/tables.html">table</a>
column layout, the direction of horizontal <a
href="http://www.w3.org/TR/CSS21/visufx.html#overflow">overflow</a>, and
the default alignment of text within a line, and other things that depend
on the base inline base direction.
<p>Values for this property have the following meanings:
<dl>
<dt><dfn id=ltr>ltr</dfn>
<dd>Left-to-right directionality.
<dt><dfn id=rtl>rtl</dfn>
<dd>Right-to-left directionality.
</dl>
<p class=note>The ‘<a href="#direction0"><code
class=property>direction</code></a>’ property has no effect on bidi
reordering when specified on inline elements whose ‘<a
href="#unicode-bidi0"><code class=property>unicode-bidi</code></a>’
property's value is ‘<a href="#normal"><code
class=css>normal</code></a>’.
<p>The value of the ‘<a href="#direction0"><code
class=property>direction</code></a>’ property on the root element is
also propagated to the initial containing block and, together with the
‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ property, determines the
document's principal writing mode. (See <a
href="#principal-writing-mode">below</a>.)
<p class=note>Note that the ‘<a href="#direction0"><code
class=property>direction</code></a>’ property of the HTML BODY
element is <em>not</em> propagated to the viewport. That special behavior
only applies to the background and overflow properties.
<p class=note>The ‘<a href="#direction0"><code
class=property>direction</code></a>’ property, when specified for
table column elements, is not inherited by cells in the column since
columns are not the ancestors of the cells in the document tree. Thus, CSS
cannot easily capture the "dir" attribute inheritance rules described in
<a href="#HTML401" rel=biblioentry>[HTML401]<!--{{HTML401}}--></a>,
section 11.3.2.1.
<h3 id=unicode-bidi><span class=secno>2.2. </span> Embeddings and
Overrides: the ‘<a href="#unicode-bidi0"><code
class=property>unicode-bidi</code></a>’ property</h3>
<table class=propdef>
<tbody>
<tr>
<th>Name:
<td><dfn id=unicode-bidi0>unicode-bidi</dfn>
<tr>
<th>Value:
<td>normal | embed | [ isolate || bidi-override ] | plaintext
<tr>
<th>Initial:
<td>normal
<tr>
<th>Applies to:
<td>all elements, but see prose
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>specified value
</table>
<p>Values for this property have the following meanings:
<dl>
<dt><dfn id=normal>normal</dfn>
<dd>The element does not open an additional level of embedding with
respect to the bidirectional algorithm. For inline elements, implicit
reordering works across element boundaries.
<dt><dfn id=embed>embed</dfn>
<dd>If the element is inline, this value opens an additional level of
embedding with respect to the bidirectional algorithm. The direction of
this embedding level is given by the ‘<a href="#direction0"><code
class=property>direction</code></a>’ property. Inside the element,
reordering is done implicitly. This corresponds to adding a LRE (U+202A),
for ‘<code class=css>direction: ltr</code>’, or RLE (U+202B),
for ‘<code class=css>direction: rtl</code>’, at the start of
the element and a PDF (U+202C) at the end of the element. <span
class=note>This value has no effect on elements that are not
inline.</span>
<dt><dfn id=isolate>isolate</dfn>
<dd>For the purposes of the Unicode bidirectional algorithm, the contents
of the element are considered to be inside a separate, independent
paragraph with a base directionality given by the element's ‘<a
href="#direction0"><code class=property>direction</code></a>’
property, and for the purpose of bidi resolution in its containing bidi
paragraph (if any), the element itself is treated as if it were an Object
Replacement Character (U+FFFC). (If the element is broken across multiple
lines, then each box of the element is treated as an Object Replacement
Character.)
<dt><dfn id=bidi-override>bidi-override</dfn>
<dd>For inline elements this creates an override. For block-container
elements this creates an override for inline-level descendants not within
another block container element. This means that inside the element,
reordering is strictly in sequence according to the ‘<a
href="#direction0"><code class=property>direction</code></a>’
property; the implicit part of the bidirectional algorithm is ignored.
This corresponds to adding a LRO (U+202D), for ‘<code
class=css>direction: ltr</code>’, or RLO (U+202E), for ‘<code
class=css>direction: rtl</code>’, at the start of the element and a
PDF (U+202C) at the end of the element.
<dt><dfn id=plaintext>plaintext</dfn>
<dd>
<p>For the purposes of the Unicode bidirectional algorithm, the base
directionality of each bidi paragraph for which the element forms the
containing block is determined not by the element's computed ‘<a
href="#direction0"><code class=property>direction</code></a>’ as
usual, but by following the heuristic in rules P2 and P3 of the Unicode
bidirectional algorithm. For inline elements, this value behaves as for
‘<a href="#isolate"><code class=css>isolate</code></a>’,
except, as with block containers, the base directionality is determined
by following the Unicode heuristic instead of by using the ‘<a
href="#direction0"><code class=property>direction</code></a>’
value.
</dl>
<p>The final order of characters within in each bidi paragraph is the same
as if the bidi control codes had been added as described above, markup had
been stripped, and the resulting character sequence had been passed to an
implementation of the Unicode bidirectional algorithm for plain text that
produced the same line-breaks as the styled text.
<p>In this process, replaced elements with ‘<code class=css>display:
inline</code>’ are treated as neutral characters, unless their
‘<a href="#unicode-bidi0"><code
class=property>unicode-bidi</code></a>’ property has a value other
than ‘<a href="#normal"><code
class=property>normal</code></a>’, in which case they are treated as
strong characters in the ‘<a href="#direction0"><code
class=property>direction</code></a>’ specified for the element. All
other atomic inline-level boxes are treated as neutral characters always.
<p>If an inline element is broken around a bidi paragraph boundary (e.g. if
split by a block or forced paragraph break), then the bidi control codes
corresponding to the end of the element are added before the interruption
and the codes corresponding to the start of the element are added after
it. (In other words, any embedding levels or overrides started by the
element are closed at the paragraph break and reopened on the other side
of it.)
<p>Because the Unicode algorithm has a limit of <em title="According to
unicode 3.0, chapter 3, section 12, definition BD2. Specifically, page 58
here: http://www.unicode.org/unicode/uni2book/ch03.pdf"> 61 levels</em> of
embedding, care should be taken not to use <span
class=propinst-unicode-bidi>‘<a href="#unicode-bidi0"><code
class=property>unicode-bidi</code></a>’</span> with a value other
than ‘<a href="#normal"><code
class=property>normal</code></a>’ unless appropriate. In particular,
a value of ‘<code class=property>inherit</code>’ should be
used with extreme caution. However, for elements that are, in general,
intended to be displayed as blocks, a setting of ‘<code
class=css>unicode-bidi: isolate</code>’ is preferred to keep the
element together in case display is changed to inline (see example below).
<h3 id=bidi-example><span class=secno>2.3. </span> Example of Bidirectional
Text</h3>
<p>The following example shows an XML document with bidirectional text. It
illustrates an important design principle: document language designers
should take bidi into account both in the language proper (elements and
attributes) and in any accompanying style sheets. The style sheets should
be designed so that bidi rules are separate from other style rules, and
such rules should not be overridden by other style sheets so that the
document language's bidi behavior is preserved.
<div class=example>
<p>In this example, lowercase letters stand for inherently left-to-right
characters and uppercase letters represent inherently right-to-left
characters. The text stream is shown in logical backing store order.</p>
<pre class=xml-example><code class=xml>
<HEBREW>
<PAR>HEBREW1 HEBREW2 english3 HEBREW4 HEBREW5</PAR>
<PAR>HEBREW6 <EMPH>HEBREW7</EMPH> HEBREW8</PAR>
</HEBREW>
<ENGLISH>
<PAR>english9 english10 english11 HEBREW12 HEBREW13</PAR>
<PAR>english14 english15 english16</PAR>
<PAR>english17 <HE-QUO>HEBREW18 english19 HEBREW20</HE-QUO></PAR>
</ENGLISH>
</code></pre>
<p>Since this is arbitrary XML, the style sheet is responsible for setting
the writing direction. This is the style sheet:</p>
<pre>
/* Rules for bidi */
HEBREW, HE-QUO {direction: rtl; unicode-bidi: embed;}
ENGLISH {direction: ltr; unicode-bidi: embed;}
/* Rules for presentation */
HEBREW, ENGLISH, PAR {display: block;}
EMPH {font-weight: bold;}
</pre>
<p>The HEBREW element is a block with a right-to-left base direction, the
ENGLISH element is a block with a left-to-right base direction. The PARs
are blocks that inherit the base direction from their parents. Thus, the
first two PARs are read starting at the top right, the final three are
read starting at the top left. Please note that HEBREW and ENGLISH are
chosen as element names for explicitness only; in general, element names
should convey structure without reference to language.</p>
<p>The EMPH element is inline-level, and since its value for <span
class=propinst-unicode-bidi>‘<a href="#unicode-bidi0"><code
class=property>unicode-bidi</code></a>’</span> is ‘<a
href="#normal"><code class=property>normal</code></a>’ (the initial
value), it has no effect on the ordering of the text. The HE-QUO element,
on the other hand, creates an embedding.</p>
<p>The formatting of this text might look like this if the line length is
long:</p>
<pre class=ascii-art>
5WERBEH 4WERBEH english3 2WERBEH 1WERBEH
8WERBEH <b>7WERBEH</b> 6WERBEH
english9 english10 english11 13WERBEH 12WERBEH
english14 english15 english16
english17 20WERBEH english19 18WERBEH
</pre>
<p>Note that the HE-QUO embedding causes HEBREW18 to be to the right of
english19.</p>
<p>If lines have to be broken, it might be more like this:</p>
<pre class=ascii-art>
2WERBEH 1WERBEH
-EH 4WERBEH english3
5WERB
-EH <b>7WERBEH</b> 6WERBEH
8WERB
english9 english10 en-
glish11 12WERBEH
13WERBEH
english14 english15
english16
english17 18WERBEH
20WERBEH english19
</pre>
<p>Because HEBREW18 must be read before english19, it is on the line above
english19. Just breaking the long line from the earlier formatting would
not have worked. Note also that the first syllable from english19 might
have fit on the previous line, but hyphenation of left-to-right words in
a right-to-left context, and vice versa, is usually suppressed to avoid
having to display a hyphen in the middle of a line.</p>
</div>
<!-- example -->
<h3 id=bidi-box-model><span class=secno>2.4. </span> Box model for inline
elements in bidirectional context</h3>
<p>Since bidi reordering can split apart and reorder text that is logically
contiguous, bidirectional text can cause an inline boxes to be split and
reordered within a line.
<p class=note>Note that in order to be able to flow inline boxes in a
uniform direction (either entirely left-to-right or entirely
right-to-left), anonymous inline boxes may have to be created.</p>
<!-- CSS2.1 8.6 -->
<p>For each line box, UAs must take the inline boxes generated for each
element and render the margins, borders and padding in visual order (not
logical order). The <a href="#start"><i>start</i></a>-most box on the
first line box in which the element appears has the <a
href="#start"><i>start</i></a> edge's margin, border, and padding; and the
end-most box on the last line box in which the element appears has the <a
href="#end"><i>end</i></a> edge's margin, border, and padding. For
example, in the ‘<a href="#horizontal-tb"><code
class=css>horizontal-tb</code></a>’ writing mode:
<ul>
<li>When the parent's ‘<a href="#direction0"><code
class=property>direction</code></a>’ property is ‘<a
href="#ltr"><code class=css>ltr</code></a>’, the left-most
generated box of the first line box in which the element appears has the
left margin, left border and left padding, and the right-most generated
box of the last line box in which the element appears has the right
padding, right border and right margin.
<li>When the parent's ‘<a href="#direction0"><code
class=property>direction</code></a>’ property is ‘<a
href="#rtl"><code class=css>rtl</code></a>’, the right-most
generated box of the first line box in which the element appears has the
right padding, right border and right margin, and the left-most generated
box of the last line box in which the element appears has the left
margin, left border and left padding.
</ul>
<p>Analogous rules hold for vertical writing modes.
<p class=note>The ‘<code
class=property>box-decoration-break</code>’ property can override
this behavior to draw box decorations on both sides of each box. <a
href="#CSS3BG" rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a>
<h2 id=vertical-intro><span class=secno>3. </span> Introduction to Vertical
Text</h2>
<p><em>This subsection is non-normative.</em>
<p>In addition to extensions to CSS2.1’s support for bidirectional
text, this module introduces the rules and properties needed to support
vertical text layout in CSS.
<p>Unlike languages that use the Latin script which are primarily laid out
horizontally, Asian languages such as Chinese and Japanese can be laid out
vertically. The Japanese example below shows the same text laid out
horizontally and vertically. In the horizontal case, text is read from
left to right, top to bottom. For the vertical case, the text is read top
to bottom, right to left. Indentation from the left edge in the
left-to-right horizontal case translates to indentation from the top edge
in the top-to-bottom vertical case.
<div class=figure>
<p><img alt="A comparison of horizontal and vertical Japanese shows that
although the lines rotate, the characters remain upright. Some glyphs,
however change: a period mark shifts from the bottom left of its glyph
box to the top right. Running headers, however, may remain laid out
horizontally across the top of the page." src=vert-horiz-comparison.png></p>
<p class=caption>Comparison of vertical and horizontal Japanese: iBunko
application (iOS)</p>
</div>
<p class=note>For Chinese and Japanese lines are ordered either right to
left or top to bottom, while for Mongolian and Manchu lines are ordered
left to right.
<p>The change from horizontal to vertical writing can affect not just the
layout, but also the typesetting. For example, the position of a
punctuation mark within its spacing box can change from the horizontal to
the vertical case, and in some cases alternate glyphs are used.
<p>Vertical text that includes Latin script text or text from other scripts
normally displayed horizontally can display that text in a number of ways.
For example, Latin words can be rotated sideways, or each letter can be
oriented upright:
<div class=figure>
<p><img alt="A dictionary definition for ヴィルス
might write the English word 'virus' rotated 90° clockwise, but stack
the letters of the initialisms 'RNA' and 'DNA' upright."
src=vert-latin-layouts.png></p>
<p class=caption>Examples of Latin in vertical Japanese: Daijirin Viewer
1.4 (iOS)</p>
</div>
<p>In some special cases such as two-digit numbers in dates, text is fit
compactly into a single vertical character box:
<div class=figure id=fig-mac>
<p><img alt="An excerpt from MacFan shows several possible vertical
layouts for numbers: the two-digit month and day are written as
horizontal-in-vertical blocks; the years are written with each character
upright; except in the English phrase “for Mac 2011”, where
the date is rotated to match the rotated Latin."
src=vert-number-layouts.png></p>
<p class=caption>Mac Fan, December 2010, p.49</p>
</div>
<p>Layouts often involve a mixture of vertical and horizontal elements:
<div class=figure>
<p><img alt="Magazines often mix horizontal and vertical layout; for
example, using one orientation for the main article text and a different
one for sidebar or illustrative content." src=vert-horiz-combination.png></p>
<p class=caption>Mixture of vertical and horizontal elements</p>
</div>
<p>Vertical text layouts also need to handle bidirectional text layout;
clockwise-rotated Arabic, for example, is laid out bottom-to-top.
<h3 id=writing-mode><span class=secno>3.1. </span> Block Flow Direction:
the ‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ property</h3>
<table class=propdef>
<tbody>
<tr>
<th>Name:
<td><dfn id=writing-mode1>writing-mode</dfn>
<tr>
<th>Value:
<td>horizontal-tb | vertical-rl | vertical-lr
<tr>
<th>Initial:
<td>horizontal-tb
<tr>
<th>Applies to:
<td>All elements except table row groups, table column groups, table
rows, and table columns
<tr>
<th>Inherited:
<td>yes
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>specified value
</table>
<p>This property sets the block flow direction. Possible values:
<dl>
<dt><dfn id=horizontal-tb>horizontal-tb</dfn>
<dd>Top-to-bottom block flow. The writing mode is horizontal.
<dt><dfn id=vertical-rl>vertical-rl</dfn>
<dd>Right-to-left block flow. The writing mode is vertical.
<dt><dfn id=vertical-lr>vertical-lr</dfn>
<dd>Left-to-right block flow. The writing mode is vertical.
</dl>
<p>The ‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ property determines the
direction of block flow. This determines the progression of block-level
boxes in a block formatting context; the progression of line boxes in a
block container that contains inlines; and the progression of rows in a
table. By virtue of determining the stacking direction of line boxes, the
‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ property also determines
whether line boxes and thus the writing mode is horizontal or vertical.
<p>When set on the root element, the ‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ property together with the
‘<a href="#direction0"><code
class=property>direction</code></a>’ property determines the <dfn
id=principal-writing-mode>principal writing mode</dfn> of the document.
This writing mode is used, for example, to determine the default page
progression direction. (See <a href="#CSS3PAGE"
rel=biblioentry>[CSS3PAGE]<!--{{CSS3PAGE}}--></a>.) The ‘<a
href="#writing-mode1"><code class=property>writing-mode</code></a>’
value of the root element is also propagated to the initial containing
block and sets the block flow direction of the initial block formatting
context.
<p class=note>Note that the ‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ property of the HTML BODY
element is <em>not</em> propagated to the viewport. That special behavior
only applies to the background and overflow properties.
<p>If an element has a different block flow direction than its containing
block:
<ul>
<li>If the element has a specified ‘<code
class=property>display</code>’ of ‘<code
class=css>inline</code>’, its ‘<code
class=property>display</code>’ computes to ‘<code
class=property>inline-block</code>’. <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<li>If the element has a specified ‘<code
class=property>display</code>’ of ‘<code
class=css>run-in</code>’, its ‘<code
class=property>display</code>’ computes to ‘<code
class=property>block</code>’. <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
</ul>
<p>If such an element is a block container, then it establishes a new block
formatting context.
<p>The content of replaced elements do not rotate due to the writing mode:
images, for example, remain upright. However replaced content involving
text (such as MathML content or form elements) should match the replaced
element's writing mode and line orientation if the UA supports such a
vertical writing mode for the replaced content.
<div class=example>
<p>In the following example, two block elements (1 and 3) separated by an
image (2) are presented in various flow writing modes.</p>
<p>Here is a diagram of horizontal writing mode (<code>writing-mode:
horizontal-tb</code>):</p>
<p><img alt="Diagram of horizontal layout: blocks 1, 2, and 3 are stacked
top-to-bottom" height=300 src=horizontal.png width=219></p>
<p>Here is a diagram for the right-to-left vertical writing mode commonly
used in East Asia (<code>writing-mode: vertical-rl</code>):</p>
<p><img alt="Diagram of a right-to-left vertical layout: blocks 1, 2, and
3 are arranged side by side from right to left" height=191
src=vertical-rl.png width=297></p>
<p>And finally, here is a diagram for the left-to-right vertical writing
mode used for Manchu and Mongolian (<code>writing-mode:
vertical-lr</code>):</p>
<p><img alt="Diagram of left-to-right vertical layout: blocks 1, 2, and 3
are arranged side by side from left to right" height=191
src=vertical-lr.png width=300></p>
</div>
<div class=example>
<p>In the following example, some form controls are rendered inside a
block with ‘<a href="#vertical-rl"><code
class=css>vertical-rl</code></a>’ writing mode. The form controls
are rendered to match the writing mode.
<pre>
<!-- --><style>
<!-- --> form { writing-mode: vertical-rl; }
<!-- --></style>
<!-- -->...
<!-- --><form>
<!-- --><p><label>姓名 <input value="艾俐俐"></label>
<!-- --><p><label>语文 <select><option>English
<!-- --> <option>français
<!-- --> <option>فارسی
<!-- --> <option>中文
<!-- --> <option>日本语</select></label>
<!-- --></form></pre>
<p><img alt="Screenshot of vertical layout: the input element is laid
lengthwise from top to bottom and its contents rendered in a vertical
typographic mode, matching the labels outside it. The drop-down selection
control after it slides out to the side (towards the after edge of the
block) rather than downward as it would in horizontal writing modes."
src=vertical-form.png></p>
</div>
<div class=example>
<p>In this example, ‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ sets the list markers
upright using the ‘<code class=css>::marker</code>’
pseudo-element. Vertical alignment ensures that longer numbers will still
align with the right of the first line of text. <a href="#CSS3LIST"
rel=biblioentry>[CSS3LIST]<!--{{CSS3LIST}}--></a>
<pre>::marker { writing-mode: horizontal-tb;
<!-- --> vertical-align: text-top;
<!-- --> color: blue; }</pre>
<div class=figure>
<p><img alt="Diagram showing list markers of '1.', '2.', '3.' sitting
upright atop sideways vertical Latin list item text." class=example
src=vertical-horizontal-list-markers.png>
<p class=caption>Example of horizontal list markers in a vertical list</p>
</div>
</div>
<h4 id=svg-writing-mode><span class=secno>3.1.1. </span> SVG1.1 ‘<a
href="#writing-mode1"><code class=property>writing-mode</code></a>’
Values</h4>
<p>SVG1.1 <a href="#SVG11" rel=biblioentry>[SVG11]<!--{{!SVG11}}--></a>
defines some additional values: ‘<code class=css>lr</code>’,
‘<code class=css>lr-tb</code>’, ‘<code
class=css>rl</code>’, ‘<code class=css>rl-tb</code>’,
‘<code class=css>tb</code>’, and ‘<code
class=css>tb-rl</code>’.
<p>These values are <em>deprecated</em> in any context except SVG1
documents. Implementations that wish to support these values in the
context of CSS must treat them as follows:
<table class=data>
<thead>
<tr>
<th>SVG1/Obsolete
<th>CSS
<tbody>
<tr>
<td>‘<code class=css>lr</code>’
<td rowspan=3>‘<a href="#horizontal-tb"><code
class=css>horizontal-tb</code></a>’
<tr>
<td>‘<code class=css>lr-tb</code>’
<tr>
<td>‘<code class=css>rl</code>’
<tr>
<td>‘<code class=css>tb</code>’
<td rowspan=2>‘<a href="#vertical-rl"><code
class=css>vertical-rl</code></a>’
<tr>
<td>‘<code class=css>tb-rl</code>’
</table>
<p class=note>The SVG1.1 values were also present in an older revision of
the CSS ‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ specification, which is
obsoleted by this specification. The additional ‘<code
class=css>tb-lr</code>’ value of that revision is replaced by
‘<a href="#vertical-lr"><code
class=css>vertical-lr</code></a>’.
<p>In SVG1.1, these values set the <dfn
id=inline-progression-direction>inline progression direction</dfn>, in
other words, the direction the current text position advances each time a
glyph is added. This is a geometric process that happens <a
href="#after"><em>after</em></a> bidi reordering, and thus has no effect
on the interpretation of the ‘<a href="#direction0"><code
class=property>direction</code></a>’ property (which is independent
of ‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’). (See <a
href="http://www.w3.org/TR/SVG/text.html#RelationshipWithBiDirectionality">Relationship
with bidirectionality</a>. <a href="#SVG11"
rel=biblioentry>[SVG11]<!--{{!SVG11}}--></a>)
<p class=note>There are varying interpretations on whether this process
causes "writing-mode: rl" to merely shift the text string or reverse the
order of all glyphs in the text.
<h2 id=inline-alignment><span class=secno>4. </span> Inline-level Alignment</h2>
<p>When different kinds of inline-level content are placed together on a
line, the baselines of the content and the settings of the ‘<code
class=property>vertical-align</code>’ property control how they are
aligned in the transverse direction of the line box. This section
discusses what baselines are, how to find them, and how they are used
together with the ‘<code class=property>vertical-align</code>’
property to determine the alignment of inline-level content.
<h3 id=intro-baselines><span class=secno>4.1. </span> Introduction to
Baselines</h3>
<p><em>This section is non-normative.</em>
<p>A <dfn id=baseline>baseline</dfn> is a line along the <i>inline axis</i>
of a line box along which individual glyphs of text are aligned. Baselines
guide the design of glyphs in a font (for example, the bottom of most
alphabetic glyphs typically align with the alphabetic baseline), and they
guide the alignment of glyphs from different fonts or font sizes when
typesetting.
<div class=figure> [Picture of alphabetic text in two font sizes with the
baseline and emboxes indicated.]</div>
<p>Different writing systems prefer different baseline tables.
<div class=figure>
<p><img alt="Latin prefers the alphabetic baseline, on top of which most
letters rest, though some have descenders that dangle below it. Indic
scripts are sometimes typeset with a hanging baseline, since their glyph
shapes appear to be hanging from a horizontal line. Han-based systems,
whose glyphs are designed to fill a square, tend to align on their
bottoms." src=script-preferred-baselines.gif></p>
<p class=caption>Preferred baselines in various writing systems</p>
</div>
<p>A well-constructed font contains a <dfn id=baseline-table>baseline
table</dfn>, which indicates the position of one or more baselines within
the font's design coordinate space. (The design coordinate space is scaled
with the font size.)
<div class=figure>
<p><img alt="" src=baselines.gif></p>
<p class=caption>In a well-designed mixed-script font, the glyphs are
positioned in the coordinate space to harmonize with one another when
typeset together. The baseline table is then constructed to match the
shape of the glyphs, each baseline positioned to match the glyphs from
its preferred scripts.</p>
</div>
<p>The baseline table is a property of the font, and the positions of the
various baselines apply to all glyphs in the font.
<p>Different baseline tables can be provided for alignment in horizontal
and vertical text. UAs should use the vertical tables in vertical
typesetting modes and the horizontal tables otherwise.
<h3 id=text-baselines><span class=secno>4.2. </span> Text Baselines</h3>
<p>In this specification, only the following baselines are considered:
<dl>
<dt>alphabetic
<dd>The <dfn id=alphabetic-baseline>alphabetic baseline</dfn>, which
typically aligns with the bottom of uppercase Latin glyphs. In horizontal
typographic mode, this is the dominant baseline.
<dt>central
<dd>The <dfn id=central-baseline>central baseline</dfn>, which typically
crosses the center of the em box. In vertical typographic mode, this is
the dominant baseline. If the font is missing this baseline, it is
assumed to be halfway between the ascender (<a
href="#over"><i>over</i></a>) and descender (<a
href="#under"><i>under</i></a>) edges of the em box.
</dl>
<p class=note>A future CSS module will deal with baselines in more detail
and allow the choice of other dominant baselines and alignment options.
<h3 id=replaced-baselines><span class=secno>4.3. </span> Atomic Inline
Baselines</h3>
<p>If an <a
href="http://www.w3.org/TR/CSS21/visuren.html#inline-boxes">atomic
inline</a> (such as an inline-block, inline-table, or replaced inline
element) is not capable of providing its own baseline information, then
the UA synthesizes a baseline table thus:
<dl>
<dt>alphabetic
<dd>The alphabetic baseline is assumed to be at the <a
href="#under"><i>under</i></a> margin edge.
<dt>central
<dd>The central baseline is assumed to be halfway between the <a
href="#under"><i>under</i></a> and <a href="#over"><i>over</i></a> margin
edges of the box.
</dl>
<h3 id=baseline-alignment><span class=secno>4.4. </span> Baseline Alignment</h3>
<p>The <dfn id=dominant-baseline>dominant baseline</dfn> (which <a
href="#text-baselines">can change</a> based on the writing mode) is used
in CSS for alignment in two cases:
<ul>
<li><strong>Aligning glyphs from different fonts within the same inline
box.</strong> The glyphs are aligned by matching up the positions of the
dominant baseline in their corresponding fonts.
<li><strong>Aligning a child inline-level box within its parent.</strong>
For the ‘<code class=property>vertical-align</code>’ value of
‘<a href="#baseline"><code class=css>baseline</code></a>’,
child is aligned to the parent by matching the parent's dominant baseline
to the same baseline in the child. (E.g. if the parent's dominant
baseline is alphabetic, then the child's alphabetic baseline is matched
to the parent's alphabetic baseline, even if the child's dominant
baseline is something else.) For values of ‘<code
class=css>sub</code>’, ‘<code class=css>super</code>’,
‘<code class=css><length></code>’, and ‘<code
class=css><percentage></code>’, the baselines are aligned as
for ‘<a href="#baseline"><code
class=css>baseline</code></a>’, but the child is shifted according
to the offset given by its ‘<code
class=property>vertical-align</code>’ value.
<div class=example>
<p>Given following sample markup:
<pre><p><span class="outer">Ap <span class="inner"><i>ji</i></span></span></p></pre>
<p>And the following style rule:
<pre>span.inner { font-size: .75em; }</pre>
<p>The baseline tables of the parent (<code>.outer</code>) and the child
(<code>.inner</code>) will not match up due to the font size
difference. Since the dominant baseline is the alphabetic baseline, the
child box is aligned to its parent by matching up their alphabetic
baselines.
<div class=figure>
<p><img alt="" src=baseline-align-sizes.gif>
</div>
</div>
<div class=example>
<p>If we assign ‘<code class=css>vertical-align:
super</code>’ to the <code>.inner</code> element from the example
above, the same rules are used to align the <code>.inner</code> child
to its parent; the only difference is in addition to the baseline
alignment, the child is shifted to the superscript position.
<pre>span.inner { vertical-align: super; font-size: .75em; }</pre>
<div class=figure>
<p><img alt="In this example, the resulting alignment is equivalent to
shifting the parent baseline table upwards by the superscript offset,
and then aligning the child's alphabetic baseline to the shifted
position of the parent's alphabetic baseline."
src=baseline-align-super.gif>
</div>
</div>
</ul>
<h2 id=intro-text-layout><span class=secno>5. </span> Introduction to
Vertical Text Layout</h2>
<p>Each writing system has one or more native orientations. Modern scripts
can therefore be classified into three orientational categories:
<dl>
<dt>horizontal-only
<dd>Scripts that have horizontal, but not vertical, native orientation.
Includes: Latin, Arabic, Hebrew, Devanagari
<dt>vertical-only
<dd>Scripts that have vertical, but not horizontal, native orientation.
Includes: Mongolian, Phags Pa
<dt>bi-orientational
<dd>Scripts that have both vertical and horizontal native orientation.
Includes: Han, Hangul, Japanese Kana
</dl>
<p>In modern typographic systems, all glyphs are assigned a horizontal
orientation, which is used when laying out text horizontally. To lay out
vertical text, the UA needs to transform the text from its horizontal
orientation. This transformation is the <dfn
id=bi-orientational-transform>bi-orientational transform</dfn>, and there
are two types:
<dl>
<dt>rotate
<dd>Rotate the glyph from horizontal to vertical <a
href="diagrams/glyph-right.svg" type="image/svg+xml"> <img alt="Rotate
the glyph from horizontal to vertical" class=figure
src="diagrams/glyph-right.png"></a>
<dt>translate
<dd>Translate the glyph from horizontal to vertical <a
href="diagrams/glyph-upright.svg" type="image/svg+xml"> <img
alt="Translate the glyph from horizontal to vertical" class=figure
src="diagrams/glyph-upright.png"></a>
</dl>
<p>Scripts with a native vertical orientation have an intrinsic
bi-orientational transform, which orients them correctly in vertical text:
CJK (Chinese/Japanese/Korean) characters translate, that is, they are
always upright. Other scripts, such as Mongolian, rotate. (See <a
href="#script-orientations">Appendix B</a> for a list of intrinsic
bi-orientational transforms.)
<p>Scripts without a native vertical orientation can be either rotated (set
sideways) or translated (set upright): the transform used is a stylistic
preference depending on the text's usage, rather than a matter of
correctness. The ‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’ property's ‘<a
href="#upright-right"><code class=css>upright-right</code></a>’ and
‘<a href="#upright"><code class=css>upright</code></a>’ values
are provided to specify rotation vs. translation of horizontal-only text.
<p class=note>The ‘<a href="#sideways-left"><code
class=css>sideways-left</code></a>’, ‘<a
href="#sideways-right"><code class=css>sideways-right</code></a>’,
and ‘<a href="#sideways"><code class=css>sideways</code></a>’
values of ‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’ are provided for
decorative layout effects and to work around limitations in CSS support
for bottom-to-top scripts.
<p class=issue>Ideally, punctuation should be either sideways or upright
depending on whether the primary script is horizontal-only or vertical.
However, this information (which, like the base directionality, is a
property of the content) is not available to us. (UTN 22 used the concept
of a vertical directionality, given via ‘<a href="#direction0"><code
class=property>direction</code></a>’ or the HTML <code>dir</code>
attribute to handle this issue.) The current spec works around this by
using the East Asian Width property; but this approach only works if
vertical scripts do not share punctuation with horizontal-only scripts.
<h3 id=text-orientation><span class=secno>5.1. </span> Orienting Text: the
‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’ property</h3>
<table class=propdef>
<tbody>
<tr>
<th>Name:
<td><dfn id=text-orientation0>text-orientation</dfn>
<tr>
<th>Value:
<td>upright-right | upright | sideways-right | sideways-left | sideways
| use-glyph-orientation
<tr>
<th>Initial:
<td>upright-right
<tr>
<th>Applies to:
<td>all elements except table row groups, rows, column groups, and
columns
<tr>
<th>Inherited:
<td>yes
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>specified value
</table>
<p>This property specifies the orientation of characters within a line and
sets the orientation of the line. Current values only have an effect in
vertical writing modes.
<p>For readability, the term <a href="#character"><i>character</i></a> is
used in place of <em>extended grapheme cluster</em> in this section. See
<a href="#character-properties">Characters and Properties</a> for further
details.
<p>Values have the following meanings:
<dl>
<dt><dfn id=upright-right>upright-right</dfn>
<dd>
<p>In vertical writing modes, characters from horizontal-only scripts are
set sideways, i.e. 90° clockwise from their standard orientation in
horizontal text. Characters from vertical scripts are set with their
intrinsic orientation.
<p>In vertical writing modes, this value puts the element in a
<i>vertical typographic mode</i> and is typical for layout of primarily
vertical-script text.
<dt><dfn id=upright>upright</dfn>
<dd>
<p>In vertical writing modes, characters from horizonal-only scripts are
rendered upright, i.e. in their standard horizontal orientation. Shaping
characters from such scripts are shaped in their isolated forms.
Characters from vertical scripts are set with their intrinsic
orientation and shaped normally. When available, vertical glyph variants
and vertical font metrics are used to set the text. The UA must
synthesize vertical font metrics for grapheme clusters that do not have
any.
<p>For the purposes of bidi reordering, this value causes all characters
to be treated as strong LTR. This value causes the used value of
‘<a href="#direction0"><code
class=property>direction</code></a>’ to be ‘<a
href="#ltr"><code class=css>ltr</code></a>’.
<p>In vertical writing modes, this value puts the element in a
<i>vertical typographic mode</i>.
<dt><dfn id=sideways-right>sideways-right</dfn>
<dd>
<p>In vertical writing modes, this causes text to be set as if in a
horizontal layout (using horizontal glyph variants and metrics), but
rotated 90° clockwise. This value puts the element in a
<i>horizontal typographic mode</i>.
<dt><dfn id=sideways-left>sideways-left</dfn>
<dd>
<p>In vertical writing modes, this causes text to be set as if in a
horizontal layout (using horizontal glyph variants and metrics), but
rotated 90° counter-clockwise. This value puts the element in a
<i>horizontal typographic mode</i>.
<p>If set on a non-replaced inline whose parent is not ‘<a
href="#sideways-left"><code class=css>sideways-left</code></a>’,
this forces bidi isolation: the ‘<a href="#normal"><code
class=css>normal</code></a>’ and ‘<a href="#embed"><code
class=css>embed</code></a>’ values of ‘<a
href="#unicode-bidi0"><code
class=property>unicode-bidi</code></a>’ compute to ‘<a
href="#isolate"><code class=css>isolate</code></a>’, and ‘<a
href="#bidi-override"><code class=css>bidi-override</code></a>’
computes to ‘<code class=css>bidi-override isolate</code>’.
Layout of text is exactly as for ‘<a href="#sideways-right"><code
class=css>sideways-right</code></a>’ except that the text content
and baseline table of each of the element's inline boxes is mirrored
around a vertical axis along the center of its content box. The
positions of text decorations propagated from an ancestor inline
(including the block container's root inline) are not mirrored, but any
text decorations introduced by the element are positioned using the
mirrored baseline table.
<p>Similarly, if an inline child of the element has a ‘<a
href="#text-orientation0"><code
class=property>text-orientation</code></a>’ value other than
‘<a href="#sideways-left"><code
class=css>sideways-left</code></a>’, an analogous transformation
(and bidi isolation) is applied.
<dt><dfn id=sideways>sideways</dfn>
<dd>
<p>This value is equivalent to ‘<a href="#sideways-right"><code
class=css>sideways-right</code></a>’ in ‘<a
href="#vertical-rl"><code class=css>vertical-rl</code></a>’
writing mode and equivalent to ‘<a href="#sideways-left"><code
class=css>sideways-left</code></a>’ in ‘<a
href="#vertical-lr"><code class=css>vertical-lr</code></a>’
writing mode. It can be useful when setting horizontal script text
vertically in a primarily horizontal-only document.
<dt><dfn id=use-glyph-orientation>use-glyph-orientation</dfn>
<dd>
<p><a href="#SVG11" rel=biblioentry>[SVG11]<!--{{!SVG11}}--></a> defines
‘<code class=property>glyph-orientation-vertical</code>’ and
‘<code class=property>glyph-orientation-horizontal</code>’
properties that were intended to control text orientation. These
properties are <em>deprecated</em> and do not apply to non-SVG elements.
If an implementation supports these properties, the ‘<a
href="#use-glyph-orientation"><code
class=css>use-glyph-orientation</code></a>’ value when set on SVG
elements indicates that the SVG ‘<code
class=property>glyph-orientation-vertical</code>’ and ‘<code
class=property>glyph-orientation-horizontal</code>’ behavior
control the layout of text. Such UAs must set ‘<code
class=css>text-orientation: glyph-orientation</code>’ on all <a
href="http://www.w3.org/TR/SVG/intro.html#TermTextContentElement">SVG
text content elements</a> in their default UA style sheet for SVG.
<p>In all other contexts, and for implementations that do not support the
glyph orientation properties, the ‘<a
href="#use-glyph-orientation"><code
class=css>use-glyph-orientation</code></a>’ behavior is the same
as for ‘<a href="#upright-right"><code
class=css>upright-right</code></a>’.
<p class=note>This value is at-risk and may be dropped during CR.
</dl>
<div class=figure>
<table>
<tbody>
<tr>
<td> <img alt="text-orientation: upright-right" height=160
src=text-orientation-vr.png width=64>
<td> <img alt="text-orientation: upright" height=160
src=text-orientation-up.png width=64>
<td> <img alt="text-orientation: sideways-left" height=160
src=text-orientation-sl.png width=64>
<td> <img alt="text-orientation: sideways-right" height=160
src=text-orientation-sr.png width=64>
<tr>
<td>‘<a href="#upright-right"><code
class=css>upright-right</code></a>’
<td>‘<a href="#upright"><code class=css>upright</code></a>’
<td>‘<a href="#sideways-left"><code
class=css>sideways-left</code></a>’
<td>‘<a href="#sideways-right"><code
class=css>sideways-right</code></a>’
</table>
<p class=caption>‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’ values (‘<a
href="#writing-mode1"><code class=property>writing-mode</code></a>’
is ‘<a href="#vertical-rl"><code
class=css>vertical-rl</code></a>’)</p>
</div>
<p>The orientation of characters belonging to the Common, Inherited, and
Unknown script categories is defined in <a
href="#vertical-typesetting-details">Appendix C</a>. <span
class=issue>Feedback is requested on those rules.</span>
<p class=issue>Need a clear normative definition of default character
orientation for all Unicode characters that does not rely on data supplied
by fonts.
<div class=example>
<p>In the following example, the root element of a horizontal-only
document is set to use ‘<a href="#sideways"><code
class=css>sideways</code></a>’. In the rest of the document, the
author can just set ‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ without worrying about
whether the text is ‘<a href="#vertical-rl"><code
class=css>vertical-rl</code></a>’ or ‘<a
href="#vertical-lr"><code class=css>vertical-lr</code></a>’.
<pre>
:root { text-orientation: sideways; }
caption { caption-side: left; writing-mode: vertical-lr; }
thead th { writing-mode: vertical-lr; }
h1.banner { position: absolute; top: 0; right: 0; writing-mode: vertical-rl; }
</pre>
</div>
<h2 id=abstract-box><span class=secno>6. </span> Abstract Box Terminology</h2>
<p><a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> defines
the box layout model of CSS in detail. However, it only defines the box
model for the ‘<a href="#horizontal-tb"><code
class=css>horizontal-tb</code></a>’ writing mode. CSS box layout in
writing modes other than ‘<a href="#horizontal-tb"><code
class=css>horizontal-tb</code></a>’ is analogous to the box layout
defined in CSS2.1 if directions and dimensions are abstracted and remapped
appropriately. This section defines abstract directional and dimensional
terms and their mappings in order to define box layout for other writing
modes, and to provide terminology for future specs to define their layout
concepts abstractly.
<h3 id=abstract-dimensions><span class=secno>6.1. </span> Logical
Dimensions</h3>
<dl>
<dt><dfn id=block-flow-dimension>block flow dimension</dfn>
<dd>The dimension perpendicular to the flow of text with in a line, the
<i>vertical dimension</i> in horizontal writing modes, and the
<i>horizontal dimension</i> in vertical writing modes.
<dt><dfn id=inline-dimension>inline dimension</dfn>
<dd>The dimension parallel to the flow of text within a line, i.e. the
<i>horizontal dimension</i> in horizontal writing modes, and the
<i>vertical dimension</i> in vertical writing modes.
<dt><dfn id=inline-axis>inline-axis</dfn>
<dd>The axis in the block flow dimension, i.e. the <i>vertical axis</i> in
horizontal writing modes and the <i>horizontal axis</i> in vertical
writing modes.
<dt><dfn id=block-axis>block-axis</dfn>
<dd>The axis in the inline dimension, i.e. the <i>horizontal axis</i> in
horizontal writing modes and the <i>vertical axis</i> in vertical writing
modes.
<dt><dfn id=extent>extent</dfn> or <dfn id=logical-height>logical
height</dfn>
<dt>
<dd>A measurement in the block flow dimension: refers to the physical
height (vertical dimension) in horizontal writing modes, and to the
physical width (horizontal dimension) in vertical writing modes.
<dt><dfn id=measure>measure</dfn> or <dfn id=logical-width>logical
width</dfn>
<dt>
<dd>A measurement in the inline dimension: refers to the physical width
(horizontal dimension) in horizontal writing modes, and to the physical
height (vertical dimension) in vertical writing modes. (The term <a
href="#measure"><i>measure</i></a> derives from its <a
href="http://en.wikipedia.org/wiki/Measure_%28typography%29">use in
typography</a>.)
</dl>
<h3 id=abstract-directions><span class=secno>6.2. </span> Abstract and
Physical Directions</h3>
<p>The terms <dfn id=left>left</dfn>, <dfn id=right>right</dfn>, <dfn
id=top>top</dfn>, and <dfn id=bottom>bottom</dfn> are always interpreted
physically, i.e. with respect to the page independent of writing mode. Two
abstract mappings are possible for these directions: line-relative and
flow-relative, which are defined below.
<p>Although they derive from the behavior of text, these directional terms
exist even for boxes that do not contain any line boxes: they are
calculated directly from the values of the ‘<a
href="#writing-mode1"><code class=property>writing-mode</code></a>’,
‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’, and ‘<a
href="#direction0"><code class=property>direction</code></a>’
properties.
<h3 id=line-directions><span class=secno>6.3. </span> Line-relative
Directions</h3>
<p>Although the block flow direction given by ‘<a
href="#writing-mode1"><code class=property>writing-mode</code></a>’
determines whether the line is oriented horizontally or vertically, it
doesn't say anything about how the contents within the line are arranged.
<p>The <dfn id=line-relative-directions>line-relative directions</dfn> are
<a href="#over"><i>over</i></a>, <a href="#under"><i>under</i></a>, <a
href="#line-left"><i>line-left</i></a>, and <a
href="#line-right"><i>line-right</i></a>. The <dfn
id=line-orientation>line orientation</dfn>, which is given by a
combination of ‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’ and ‘<a
href="#writing-mode1"><code class=property>writing-mode</code></a>’,
determines which side of the line is the "top" and thus which sides are
<dfn id=under>under</dfn> (ascender side) and <dfn id=over>over</dfn>
(descender side) the line. The line orientation also affects the
interpretation of alignment (‘<code
class=property>vertical-align</code>’) in the transverse dimension
of the line.
<p>In addition to its <a href="#over"><i>over</i></a> and <a
href="#under"><i>under</i></a> sides, a line box, even a
vertically-oriented one, also has a "left" and "right" side, which we will
call the <a href="#line-left"><i>line-left</i></a> and <a
href="#line-right"><i>line-right</i></a> sides of the box (as distinct
from the physical left and physical right sides of the box). The <dfn
id=line-left>line-left</dfn> edge of a box is nominally the edge from
which <abbr title=left-to-right>LTR</abbr> text would start. The <dfn
id=line-right>line-right</dfn> edge of a box is nominally the edge from
which <abbr title=right-to-left>RTL</abbr> text would start. Depending on
the ‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ and ‘<a
href="#text-orientation0"><code
class=property>text-orientation</code></a>’ properties, the
line-left side of a box could be on the physical left, top, or bottom.
<div class=figure> <a href="diagrams/line-orient-up.svg"
type="image/svg+xml"> <img alt="Line orientation compass" class=landscape
src="diagrams/line-orient-up.png"></a>
<p class=caption>Line orientation compass</p>
</div>
<div class=figurepair>
<div class=figure> <a href="diagrams/line-orient-right.svg"
type="image/svg+xml"> <img alt="Typical orientation in vertical"
class=portrait src="diagrams/line-orient-right.png"></a>
<p class=caption>Typical orientation in vertical</p>
</div>
<div class=figure> <a href="diagrams/line-orient-left.svg"
type="image/svg+xml"> <img alt="Line orientation with ''text-orientation:
sideways-left''" class=portrait src="diagrams/line-orient-left.png"></a>
<p class=caption>Line orientation with ‘<code
class=css>text-orientation: sideways-left</code>’</p>
</div>
</div>
<p class=note>Note also that while the <a href="#over"><i>over</i></a> and
<a href="#under"><i>under</i></a> directions often map to the same
directions as <a href="#before">before</a> and <a href="#after">after</a>
respectively, this mapping is reversed for some combinations of ‘<a
href="#writing-mode1"><code class=property>writing-mode</code></a>’
and ‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’.
<h3 id=logical-directions><span class=secno>6.4. </span> Flow-relative
Directions</h3>
<p>The <dfn id=flow-relative-directions>flow-relative directions</dfn> are
<a href="#before">before</a>, <a href="#after">after</a>, <a
href="#start">start</a>, and <a href="#end">end</a>. In an <abbr
title=left-to-right>LTR</abbr> ‘<a href="#horizontal-tb"><code
class=css>horizontal-tb</code></a>’ writing mode, they correspond to
the top, bottom, left, and right directions, respectively.
<p>The <dfn id=before>before</dfn> edge of a box is nominally the edge that
comes earlier in the block progression, as determined by the ‘<a
href="#writing-mode1"><code class=property>writing-mode</code></a>’
property. Similarly the <dfn id=after>after</dfn> edge is the edge that
comes later in the progression.
<p>The <dfn id=start>start</dfn> edge of a box is nominally the edge from
which text of its inline base direction will start. For boxes with a used
‘<a href="#direction0"><code
class=property>direction</code></a>’ value of ‘<a
href="#ltr"><code class=css>ltr</code></a>’, this means the <a
href="#line-left"><i>line-left</i></a> edge. For boxes with a used
‘<a href="#direction0"><code
class=property>direction</code></a>’ value of ‘<a
href="#rtl"><code class=css>rtl</code></a>’, this means the <a
href="#line-right"><i>line-right</i></a> edge. The edge opposite the start
edge is the <dfn id=end>end</dfn> edge.
<p class=note>Note that while determining the <a
href="#before"><i>before</i></a> and <a href="#after"><i>after</i></a>
edges of a box depends only on the ‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ property, determining the <a
href="#start"><i>start</i></a> and <a href="#end"><i>end</i></a> edges of
a box depends not only on the ‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ property but also the
‘<a href="#direction0"><code
class=property>direction</code></a>’ <em>and</em> ‘<a
href="#text-orientation0"><code
class=property>text-orientation</code></a>’ properties.
<div class=example>
<p>An English (LTR-TB) block:</p>
<pre class=ascii-art>
<----- width / measure ----->
top side/
before side
+------------------------------+ A
left side/ | ---inline direction ---> | right side/ |
start side | | | end side |
| | block * horizontal * | height/
| | direction *writing mode* | extent
| V | |
+------------------------------+ V
bottom side/
after side
</pre>
</div>
<div class=example>
<p>A vertical Japanese block (TTB-RL):</p>
<pre class=ascii-art>
<----- width / extent ------>
top side/
start side
+------------------------------+ A
left side/ | <---block direction--- | right side/ |
after side | | | before side |
| * vertical * inline| | height/
| *writing mode* direction| | measure
| V | |
+------------------------------+ V
bottom side/
end side
</pre>
</div>
<h3 id=logical-to-physical><span class=secno>6.5. </span>
Abstract-to-Physical Mappings</h3>
<p>The following table summarizes the abstract-to-physical mappings:
<table class="complex data">
<caption>Abstract-Physical Mapping</caption>
<colgroup class=header></colgroup>
<colgroup span=10></colgroup>
<thead>
<tr>
<th scope=row>‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’
<th colspan=2>‘<a href="#horizontal-tb"><code
class=css>horizontal-tb</code></a>’
<th colspan=4>‘<a href="#vertical-rl"><code
class=css>vertical-rl</code></a>’
<th colspan=4>‘<a href="#vertical-lr"><code
class=css>vertical-lr</code></a>’
<tr>
<th scope=row>‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’
<th colspan=2>—
<th colspan=2>‘<a href="#sideways-left"><code
class=css>sideways-left</code></a>’
<th colspan=2><abbr title="upright-right, upright,
sideways-right">*right</abbr>
<th colspan=2>‘<a href="#sideways-left"><code
class=css>sideways-left</code></a>’
<th colspan=2><abbr title="upright-right, upright,
sideways-right">*right</abbr>
<tr>
<th scope=row>‘<a href="#direction0"><code
class=property>direction</code></a>’
<th>‘<a href="#ltr"><code class=css>ltr</code></a>’
<th>‘<a href="#rtl"><code class=css>rtl</code></a>’
<th>‘<a href="#ltr"><code class=css>ltr</code></a>’
<th>‘<a href="#rtl"><code class=css>rtl</code></a>’
<th>‘<a href="#ltr"><code class=css>ltr</code></a>’
<th>‘<a href="#rtl"><code class=css>rtl</code></a>’
<th>‘<a href="#ltr"><code class=css>ltr</code></a>’
<th>‘<a href="#rtl"><code class=css>rtl</code></a>’
<th>‘<a href="#ltr"><code class=css>ltr</code></a>’
<th>‘<a href="#rtl"><code class=css>rtl</code></a>’
<tbody>
<tr>
<th scope=row>extent
<td colspan=2>height
<td colspan=8>width
<tr>
<th scope=row>measure
<td colspan=2>width
<td colspan=8>height
<tr>
<th scope=row>before
<td colspan=2>top
<td colspan=4>right
<td colspan=4>left
<tr>
<th scope=row>after
<td colspan=2>bottom
<td colspan=4>left
<td colspan=4>right
<tr>
<th scope=row>start
<td>left
<td>right
<td>bottom
<td>top
<td>top
<td>bottom
<td>bottom
<td>top
<td>top
<td>bottom
<tr>
<th scope=row>end
<td>right
<td>left
<td>top
<td>bottom
<td>bottom
<td>top
<td>top
<td>bottom
<td>bottom
<td>top
<tbody>
<tr>
<th scope=row>over
<td colspan=2>top
<td colspan=2>left
<td colspan=2>right
<td colspan=2>left
<td colspan=2>right
<tr>
<th scope=row>under
<td colspan=2>bottom
<td colspan=2>right
<td colspan=2>left
<td colspan=2>right
<td colspan=2>left
<tr>
<th scope=row>line-left
<td colspan=2>left
<td colspan=2>bottom
<td colspan=2>top
<td colspan=2>bottom
<td colspan=2>top
<tr>
<th scope=row>line-right
<td colspan=2>right
<td colspan=2>top
<td colspan=2>bottom
<td colspan=2>top
<td colspan=2>bottom
</table>
<h2 id=abstract-layout><span class=secno>7. </span> Abstract Box Layout</h2>
<h3 id=vertical-layout><span class=secno>7.1. </span> Principles of Layout
in Vertical Writing Modes</h3>
<p>CSS box layout in vertical writing modes is analogous to layout in the
horizontal writing modes, following the principles outlined below:
<p>Layout calculation rules (such as those in CSS2.1, Section 10.3) that
apply to the horizontal dimension in horizontal writing modes instead
apply to the vertical dimension in vertical writing modes. Likewise,
layout calculation rules (such as those in CSS2.1, Section 10.6) that
apply to the vertical dimension in horizontal writing modes instead apply
to the horizontal dimension in vertical writing modes. Thus:
<ul>
<li>
<p>Layout rules that refer to the width use the height instead, and vice
versa.
<li>
<p>Layout rules that refer to the ‘<code
class=css>*-left</code>’ and ‘<code
class=css>*-right</code>’ box properties (border, margin, padding)
use ‘<code class=css>*-top</code>’ and ‘<code
class=css>*-bottom</code>’ instead, and vice versa. Which side of
the box the property applies to doesn't change: only which values are
inputs to which layout calculations changes. The ‘<code
class=property>margin-left</code>’ property still affects the
lefthand margin, for example; however in a ‘<a
href="#vertical-rl"><code class=css>vertical-rl</code></a>’
writing mode it takes part in margin collapsing in place of ‘<code
class=property>margin-bottom</code>’.</p>
<li>
<p>Layout rules that depend on the ‘<a href="#direction0"><code
class=property>direction</code></a>’ property to choose between
left and right (e.g. overflow, overconstraint resolution, the initial
value for ‘<code class=property>text-align</code>’, table
column ordering) are abstracted to the <a href="#start">start</a> and <a
href="#end">end</a> sides and applied appropriately.
</ul>
<div class=example>
<p>For example, in vertical writing modes, table rows are vertical and
table columns are horizontal. In a ‘<a href="#vertical-rl"><code
class=css>vertical-rl</code></a>’ ‘<a
href="#upright-right"><code class=css>upright-right</code></a>’
‘<a href="#rtl"><code class=css>rtl</code></a>’ table, the
first column would be on the bottom (the start side), and the first row
on the right (the before side). The table's ‘<code
class=property>margin-right</code>’ and ‘<code
class=property>margin-left</code>’ would collapse with margins
before (on the right) and after (on the left) the table, respectively,
and if the table had ‘<code class=css>auto</code>’ values for
‘<code class=property>margin-top</code>’ and ‘<code
class=property>margin-bottom</code>’ it would be centered
vertically within its block flow.
<div class=figure>
<p><a href="diagrams/vertical-table.svg" type="image/svg+xml"> <img
alt="Diagram of a vertical-rl upright-right rtl table in a vertical
block formatting context, showing the ordering of rows, cells, and
columns as described above." class=example
src="diagrams/vertical-table.png"></a>
<p class=caption>Table in ‘<a href="#vertical-rl"><code
class=css>vertical-rl</code></a>’ RTL writing mode</p>
</div>
</div>
<p>For features such as text alignment, floating, and list marker
positioning, that primarily reference the left or right sides of the line
box or its longitudinal parallels and therefore have no top or bottom
equivalent, the <a href="#line-left">line left</a> and <a
href="#line-right">line right</a> sides are used as the reference for the
left and right sides respectively.
<p>Likewise for features such as underlining, overlining, and baseline
alignment (the unfortunately-named ‘<code
class=property>vertical-align</code>’), that primarily reference the
top or bottom sides of the linebox or its transversal parallels and
therefore have no left or right equivalent, the <a href="#over">over</a>
and <a href="#under">under</a> sides are used as the reference for the top
and bottom sides respectively.
<p>The details of these mappings are provided below.
<h3 id=dimension-mapping><span class=secno>7.2. </span> Dimensional Mapping</h3>
<!--
<p>Properties that are named in terms of the x and y axes are
logical with respect to the block flow direction rather than absolute
with respect to the page. Specifically:
<ul>
<li>The ''repeat-x'' keyword of 'background-repeat' tiles in the
inline dimension of the element, which is not necessarily the
horizontal dimension. [[!CSS21]] [[!CSS3BG]]
<li>The ''repeat-y'' keyword of 'background-repeat' tiles in the
block flow dimension of the element, which is not necessarily
the vertical dimension. [[!CSS21]] [[!CSS3BG]]
<li>The 'overflow-x' property controls overflow in the inline
dimension of the element. [[!CSS3UI]]
<li>The 'overflow-y' property controls overflow in the block
flow dimension of the element. [[!CSS3UI]]
</ul>
-->
<p>Certain properties behave logically as follows:
<ul>
<li>The first and second values of the ‘<code
class=property>border-spacing</code>’ property represent spacing
between columns and rows respectively, not necessarily the horizontal and
vertical spacing respectively. <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<li>The ‘<code class=property>line-height</code>’ property
always refers to the logical height. <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
</ul>
<p>The height properties (‘<code class=property>height</code>’,
‘<code class=property>min-height</code>’, and ‘<code
class=property>max-height</code>’) refer to the physical height, and
the width properties (‘<code class=property>width</code>’,
‘<code class=property>min-width</code>’, and ‘<code
class=property>max-width</code>’) refer to the physical width.
However, the rules used to calculate box dimensions and positions are
logical.
<p>For example, the calculation rules in <a
href="http://www.w3.org/TR/CSS21/visudet.html#Computing_widths_and_margins">CSS2.1
Section 10.3</a> are used for the inline dimension measurements: they
apply to the measure (which could be either the physical width or physical
height) and to the the start and end margins, padding, and border.
Likewise the calculation rules in <a
href="http://www.w3.org/TR/CSS21/visudet.html#Computing_heights_and_margins">CSS2.1
Section 10.6</a> are used in the block dimension: they apply to the extent
and to the before and after margins, padding, and border. <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<p>As a corollary, percentages on the margin and padding properties, which
are always calculated with respect to the containing block width in
CSS2.1, are calculated with respect to the <a
href="#measure"><em>measure</em></a> of the containing block in CSS3.
<h3 id=orthogonal-flows><span class=secno>7.3. </span> Orthogonal Flows</h3>
<p>When an element has a different ‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ from its containing block
two cases are possible:
<ul>
<li>The two writing modes are parallel to each other. (For example,
‘<a href="#vertical-rl"><code
class=css>vertical-rl</code></a>’ and ‘<a
href="#vertical-lr"><code class=css>vertical-lr</code></a>’).
<li>The two writing modes are perpendicular to each other. (For example,
‘<a href="#horizontal-tb"><code
class=css>horizontal-tb</code></a>’ and ‘<a
href="#vertical-rl"><code class=css>vertical-rl</code></a>’).
</ul>
<p>To handle the second case, CSS layout calculations are divided into two
phases: sizing a box, and positioning the box within its flow. In the
sizing phase—calculating the width and height of the box—the
dimensions of the box and the containing block are mapped to the measure
and extent and calculations performed accordingly using the writing mode
of the element. In the positioning phase—calculating the positioning
offsets, margins, borders, and padding—the dimensions of the box and
its containing block are mapped to the measure and extent and calculations
performed according to the writing mode of the containing block.
<p>For example, if a vertical block is placed inside a horizontal block,
then when calculating the physical height (which is the measure) of the
child block the physical height of the parent block is used to calculate
the measure of the child's containing block, even though the physical
height is the extent, not the measure, of the parent block.
<p>Since auto margins are resolved consistent with the containing block's
writing mode, a box establishing an orthogonal flow, can, once sized, be
aligned or centered within its containing block just like other
block-level elements by using auto margins.
<p>It is common in CSS for a containing block to have a defined measure,
but not a defined extent. This typically happens in CSS2.1 when a
containing block has an ‘<code class=css>auto</code>’ height,
for example: its width is given by the calculations in <a
href="http://www.w3.org/TR/CSS21/visudet.html#blockwidth">10.3.3</a>, but
its extent depends on its contents. In such cases the <dfn
id=available-measure>available measure</dfn> is defined as the measure of
the containing block; but the <dfn id=available-extent>available
extent</dfn>, which would otherwise be the extent of the containing block,
is infinite.
<p>Orthogonal flows allow the opposite to happen: for the <a
href="#available-extent"><i>available extent</i></a> to be defined, but
the <a href="#available-measure"><i>available measure</i></a> to be
infinite. In such cases a percentage of the containing block measure
cannot be defined, and thus the initial containing block's size is used
instead as a <a href="#fallback-measure"><i>fallback measure</i></a> to
calculate such percentages.
<h4 id=orthogonal-auto><span class=secno>7.3.1. </span> Auto-sizing in
Orthogonal Flows</h4>
<p>If the computed measure of an element establishing an orthogonal flow is
‘<code class=css>auto</code>’, then the used measure is
calculated as the <a href="#fit-content"><i>fit-content</i></a>
(shrink-to-fit) size using the initial containing block's size as the
available measure.
<h4 id=orthogonal-multicol><span class=secno>7.3.2. </span> Multi-column
Layout in Orthogonal Flows</h4>
<p>If the UA supports CSS Multi-column Layout <a href="#CSS3COL"
rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a>, then for the case where
the element's extent or available extent is defined but the element's
measure is ‘<code class=css>auto</code>’:
<ol>
<li>If ‘<code class=property>column-count</code>’ and
‘<code class=property>column-width</code>’ are both
‘<code class=css>auto</code>’, a used ‘<code
class=property>column-width</code>’ is calculated for the element
as the <a href="#fill-available-measure"><i>fill-available
measure</i></a> using the <a href="#fallback-measure"><i>fallback
measure</i></a> as the <a href="#available-measure"><i>available
measure</i></a>.
<li>If the columns' extent is not fixed, the <a
href="#fill-available-extent"><i>fill-available extent</i></a> of the
element is used.
<li>The used column-count then follows from filling the resulting columns
with the element's content.
</ol>
<p>The used measure of the resulting multi-column element is then
calculated: if the content neither wraps nor paginates within the
multi-column element, then the used measure is the <a
href="#max-content-measure"><i>max-content measure</i></a> of the
element's contents; else it is calculated from the used column width,
column count, and column gap.
<p>The used extent of the element is either the used column extent (if
multiple columns were used) or the <a
href="#max-content-extent"><i>max-content extent</i></a> of the content.
<p class=note>This should behave the same as the auto-sizing algorithm
defined in the previous section, except overflowing content, instead of
continuing off the side of the containing block, is wrapped into columns
in the flow direction of the containing block, thus avoiding T-shaped
documents.
<h4 id=orthogonal-pagination><span class=secno>7.3.3. </span> Paginating
Orthogonal Flows</h4>
<p><em>This section is informative.</em>
<p>With regards to pagination, the rules in CSS2.1 still hold in vertical
writing modes and orthogonal flows: page break opportunities do not occur
inside line boxes, only between them. UAs that support <a href="#CSS3COL"
rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a> may break in the
(potentially zero-width) gap between columns, however.
<p>Note that if content spills outside the pagination stream established by
the root element, the UA is not required to print such content. Authors
wishing to mix writing modes with long streams of text are thus encouraged
to use CSS columns to keep all content flowing in the document's
pagination direction.
<div class=note>
<p>In other words, if your document would require two scrollbars on the
screen it probably won't all print. Fix your layout, e.g. by using <a
href="http://www.w3.org/TR/css3-multicol/">columns</a> so that it all
scrolls (and therefore paginates) in one direction if you want to make
sure it'll all print. T-shaped documents tend not to print well.
</div>
<h3 id=logical-direction-layout><span class=secno>7.4. </span>
Flow-Relative Mappings</h3>
<p>Flow-relative directions are calculated with respect to the writing mode
of the <em>containing block</em> of the element and used to abstract
layout rules related to the box properties (margins, borders, padding) and
any properties related to positioning the box within its containing block
(‘<code class=property>float</code>’, ‘<code
class=property>clear</code>’, ‘<a href="#top"><code
class=property>top</code></a>’, ‘<a href="#bottom"><code
class=property>bottom</code></a>’, ‘<a href="#left"><code
class=property>left</code></a>’, ‘<a href="#right"><code
class=property>right</code></a>’) For inline-level elements, the
writing mode of the <em>parent element</em> is used instead.
<p>For example, the margin that is dropped when a box's inline dimension is
<a
href="http://www.w3.org/TR/CSS21/visudet.html#blockwidth">over-constrained</a>
is the end margin as determined by the writing mode of the containing
block.
<p>The <a
href="http://www.w3.org/TR/CSS21/box.html#collapsing-margins">margin
collapsing rules</a> apply exactly with the <em>before margin</em>
substituted for the top margin and the <em>after margin</em> substituted
for the bottom margin. Similarly the before padding and border are
substituted for the top padding and border, and the after padding and
border substituted for the bottom padding and border. Note this means only
before and after margins ever collapse.
<p>Flow-relative directions are calculated with respect to the writing mode
of the element and used to abstract layout related to the element's
contents:
<ul>
<li>The initial value of the ‘<code
class=property>text-align</code>’ property aligns to the start edge
of the line box.
<li>The ‘<code class=property>text-indent</code>’ property
indents from the start edge of the line box.
<li>For tables, the ordering of columns begins on the start side of the
table, and the ordering of rows begins on the before side of the table.
</ul>
<h3 id=line-mappings><span class=secno>7.5. </span> Line-Relative Mappings</h3>
<p>The <dfn id=line-relative-directions0>line-relative directions</dfn> are
<a href="#over">over</a>, <a href="#under">under</a>, <a
href="#line-left">line-left</a>, and <a href="#line-right">line-right</a>.
In an <abbr title=left-to-right>LTR</abbr> ‘<a
href="#horizontal-tb"><code class=css>horizontal-tb</code></a>’
writing mode, they correspond to the top, bottom, left, and right
directions, respectively.
<p>The line-right and line-left directions are calculated with respect to
the writing mode of the element and used to interpret the ‘<a
href="#left"><code class=css>left</code></a>’ and ‘<a
href="#right"><code class=css>right</code></a>’ values of the
following properties:
<ul>
<li>the ‘<code class=property>text-align</code>’ property <a
href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
</ul>
<p>The line-right and line-left directions are calculated with respect to
the writing mode of the <em>containing block</em> of the element and used
to interpret the ‘<a href="#left"><code
class=css>left</code></a>’ and ‘<a href="#right"><code
class=css>right</code></a>’ values of the following properties:
<ul>
<li>the ‘<code class=property>float</code>’ property <a
href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<li>the ‘<code class=property>clear</code>’ property <a
href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
</ul>
<p>The over and under directions are calculated with respect to the writing
mode of the element and used to define the interpretation of the "top"
(over edge) and "bottom" (under edge) of the line box as follows:
<ul>
<li>For the ‘<code class=property>vertical-align</code>’
property, the "top" of the line box is the over edge; the "bottom" of the
line box is the under edge. Positive length and percentage values shift
the baseline towards the over edge. <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<li>For the ‘<code class=property>text-decoration</code>’
property, the underline is drawn on the under side of the text; the
overline is drawn on the over side of the text. <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> <span class=note>Note that
the CSS Text Module defines this in more detail and provides additional
controls for controlling the position of underlines and overlines. <a
href="#CSS3TEXT" rel=biblioentry>[CSS3TEXT]<!--{{CSS3TEXT}}--></a></span>
</ul>
<h3 id=physical-only><span class=secno>7.6. </span> Purely Physical
Mappings</h3>
<p>The following values are purely physical in their definitions and do not
respond to changes in writing mode:
<ul>
<li>the ‘<code class=css>rect()</code>’ notation of the
‘<code class=property>clip</code>’ property <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<li>the background properties <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a> <a href="#CSS3BG"
rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a>
<li>the border-image properties <a href="#CSS3BG"
rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a>
<li>the offsets of the ‘<code
class=property>box-shadow</code>’ and ‘<code
class=property>text-shadow</code>’ properties
</ul>
<h3 id=caption-side><span class=secno>7.7. </span> Table Caption Mappings:
the ‘<code class=property>caption-side</code>’ keywords</h3>
<table class=propdef>
<tbody>
<tr>
<th>Property:
<td>‘<code class=property>caption-side</code>’
<tr>
<th>New Values:
<td>‘<a href="#before"><code class=css>before</code></a>’ |
‘<a href="#after"><code class=css>after</code></a>’
<tr>
<th>Initial:
<td>before
<tr>
<th>Applies to:
<td>same as CSS2.1
<tr>
<th>Inherited:
<td>same as CSS2.1
<tr>
<th>Percentages:
<td>same as CSS2.1
<tr>
<th>Media:
<td>same as CSS2.1
<tr>
<th>Computed value:
<td>specified value
</table>
<p>This module introduces two new values to the ‘<code
class=property>caption-side</code>’ property: ‘<a
href="#before"><code class=css>before</code></a>’ and ‘<a
href="#after"><code class=css>after</code></a>’, which position the
caption before and after the table box, respectively. For tables with
‘<a href="#horizontal-tb"><code
class=css>horizontal-tb</code></a>’ writing mode, they are
equivalent to the existing ‘<a href="#top"><code
class=css>top</code></a>’ and ‘<a href="#bottom"><code
class=css>bottom</code></a>’ values, respectively. <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<p class=note>For implementations that support the ‘<code
class=property>top-outside</code>’ and ‘<code
class=property>bottom-outside</code>’ model, corresponding
‘<code class=property>before-outside</code>’ and ‘<code
class=property>after-outside</code>’ will be similarly introduced.
<p>Implementations that support the ‘<a href="#top"><code
class=css>top</code></a>’ and ‘<a href="#bottom"><code
class=css>bottom</code></a>’ values of the ‘<code
class=property>caption-side</code>’ property but do not support side
captions (i.e. ‘<a href="#left"><code
class=css>left</code></a>’ and ‘<a href="#right"><code
class=css>right</code></a>’ captions in horizontal writing modes)
must treat ‘<a href="#top"><code class=css>top</code></a>’ and
‘<a href="#bottom"><code class=css>bottom</code></a>’ as
‘<a href="#before"><code class=css>before</code></a>’, when
the table is in a vertical writing mode.
<p>For implementations that do support side captions (i.e. the ‘<a
href="#left"><code class=css>left</code></a>’ and ‘<a
href="#right"><code class=css>right</code></a>’ values from the
obsolete CSS 2.0 specification <a href="#CSS2"
rel=biblioentry>[CSS2]<!--{{CSS2}}--></a>), this module also introduces
the ‘<a href="#start"><code class=css>start</code></a>’ and
‘<a href="#end"><code class=css>end</code></a>’ values, which
behave similarly and which position the caption on the start and end sides
of the table box, calculated with respect to the writing mode of the table
element. For such implementations, the ‘<a href="#top"><code
class=css>top</code></a>’ and ‘<a href="#bottom"><code
class=css>bottom</code></a>’ values must place the caption on the
top and bottom sides of the table box, respectively.
<p class=note>The CSS2.0 side caption model had some <a
href="http://lists.w3.org/Archives/Public/www-style/2002Dec/0142.html">problems</a>
and will likely have a different definition in CSS3.</p>
<!--
<h3 id="html-attributes">HTML Attributes</h3>
<p>This section defines the mapping of HTML presentational attributes
in CSS. This section is normative for user agents supporting HTML
in addition to the 'writing-mode' property. [[!HTML40]] [[!HTML5]]
<h4 id="width-height-attributes">The <code>width</code> and <code>height</code> attributes</h4>
<p>The HTML <code>width</code> and <code>height</code> attributes refer
to the physical width and height for elements that that are replaced,
i.e.
<code><applet></code>,
<code><embed></code>,
<code><iframe></code>,
<code><img></code>,
<code><object></code>,
<code><canvas></code>,
and
<code><video></code>
<p>Form elements elements contain text, therefore their contents should be
affected by writing mode, in which case these attributes refer to the
<em>logical</em> width and height. The UA may, however, choose not
to rotate nor flip these elements in vertical writing modes if it is not
capable, and in that case, these attributes remain physical.</p>
<p class="issue">when not to rotate form elements/MathML,
should treat them as images (always upright)
or to force writing-mode to always calculate to horizontal-tb?</p>
<p>On table-related elements (<code><table></code>, <code><colgroup></code>,
<code><col></code>, <code><tr></code>, <code><th></code>,
<code><td></code>) the <code>width</code> and <code>height</code>
attributes are always logical.
<p>The <code>size</code> attribute of the <code><hr></code> element
is also logical (refers to the logical height).
<h4 id="alignment-attributes">Alignment, Float and Clear Attributes</h4>
<p>The following attributes behave the same way as their corresponding
CSS properties:</p>
<ul>
<li><code>align</code> as 'float' or 'text-align'</li>
<li><code>clear</code> as 'clear'</li>
<li><code>valign</code> as 'vertical-align'</li>
</ul>
<h4 id="spacing-attributes">Spacing Attributes</h4>
<p>The following attributes are logical and, as margins, are logical
with respect to the writing mode of the <em>parent</em> element.</p>
<ul>
<li><code>hspace</code> as start and end margins</li>
<li><code>vspace</code> as before and after margins</li>
<li>marginwidth</li>
<li>marginheight</li>
</ul>
-->
<h2 id=page-direction><span class=secno>8. </span> Page Flow: the page
progression direction</h2>
<p>In paged media CSS2.1 classifies all pages as either left or right
pages. The page progression direction, which determines whether the left
or right page in a spread is first in the flow and whether the first page
is by default a left or right page, depends on the writing direction as
follows:
<ul>
<li>The page progression is right-to-left if the root element's ‘<a
href="#writing-mode1"><code class=property>writing-mode</code></a>’
is ‘<a href="#vertical-rl"><code
class=css>vertical-rl</code></a>’ or if the root element's
‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ is ‘<a
href="#horizontal-tb"><code class=css>horizontal-tb</code></a>’ and
its ‘<a href="#direction0"><code
class=property>direction</code></a>’ is ‘<a href="#rtl"><code
class=css>rtl</code></a>’.
<li>The page progression is left-to-right if the root element's ‘<a
href="#writing-mode1"><code class=property>writing-mode</code></a>’
is ‘<a href="#vertical-lr"><code
class=css>vertical-lr</code></a>’ or if the root element's
‘<a href="#writing-mode1"><code
class=property>writing-mode</code></a>’ is ‘<a
href="#horizontal-tb"><code class=css>horizontal-tb</code></a>’ and
its ‘<a href="#direction0"><code
class=property>direction</code></a>’ is ‘<a href="#ltr"><code
class=css>ltr</code></a>’.
</ul>
<p>(Unless otherwise overridden, the first page of a document begins on the
second half of a spread, e.g. on the right page in a left-to-right page
progression.)
<h2 id=text-combine><span class=secno>9. </span> Glyph Composition</h2>
<h3 id=text-combine-horizontal><span class=secno>9.1. </span>
Horizonal-in-Vertical Composition: the ‘<a
href="#text-combine-horizontal0"><code
class=property>text-combine-horizontal</code></a>’ property</h3>
<table class=propdef>
<tbody>
<tr>
<th>Name:
<td><dfn id=text-combine-horizontal0>text-combine-horizontal</dfn>
<tr>
<th>Value:
<td>none | all | [ [digits <integer> | ascii-digits <integer> ] ||
[ alpha <integer> | latin <integer> ] || alphanumeric
<integer> ]
<tr>
<th>Initial:
<td>none
<tr>
<th>Applies to:
<td>non-replaced inline elements
<tr>
<th>Inherited:
<td>yes
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>specified value
</table>
<p>This property allows the combination of multiple characters into the
space of a single character. This property only has an effect in vertical
writing modes. Values have the following meanings:
<dl>
<dt><dfn id=none title="text-combine-horizontal:none">none</dfn>
<dd>No special processing.
<dt><dfn id=all title="text-combine-horizontal:all">all</dfn>
<dd>In vertical writing mode, attempt to display the text contents of the
element horizontally within the vertical line box, ideally within the
space of one ideographic character. (See below.) The resulting
composition is treated as a single glyph for the purposes of layout and
decoration. If the content contains any element boundaries this is
treated as ‘<code class=css>text-combine-horizontal:
none</code>’ on the element and any descendants.
<dt><dfn id=digits title="text-combine-horizontal:digits">digits</dfn>
<dd>Within the element, each sequence of consecutive horizontal digits
that has as many or fewer characters than the integer given is treated as
if it were in an anonymous inline box with ‘<code
class=css>text-combine-horizontal: all</code>’. For this property,
a <dfn id=horizontal-digit>horizontal digit</dfn> is any character
belonging to a Number category (N*) that does not belong to a <a
href="#script-orientations">vertical script</a>.
<dt><dfn id=ascii-digits
title="text-combine-horizontal:ascii-digits">ascii-digits</dfn>
<dd>Within the element, each sequence of consecutive ASCII digits
(U+0030–U+0039) that has as many or fewer characters than the
integer given is treated as if it were in an anonymous inline box with
‘<code class=css>text-combine-horizontal: all</code>’.
<p class=issue>This definition is would replace ‘<code
class=css>digits</code>’ as a simplification.
<dt><dfn id=alpha title="text-combine-horizontal:alpha">alpha</dfn>
<dd>Within the element, each sequence of consecutive horizontal letters
that has as many or fewer characters than the integer given is treated as
if it were in an anonymous inline box with ‘<code
class=css>text-combine-horizontal: all</code>’. For this property,
a <dfn id=horizonal-letter>horizonal letter</dfn> is any character
belonging to a Letter category (L*) that does not belong to a <a
href="#script-orientations">vertical script</a>.
<dt><dfn id=latin title="text-combine-horizontal:latin">latin</dfn>
<dd>Within the element, each sequence of Latin letters that has as many or
fewer characters than the integer given is treated as if it were in an
anonymous inline box with ‘<code class=css>text-combine-horizontal:
all</code>’. For this property, a <dfn id=latin-letter>Latin
letter</dfn> is any character belonging to a Letter category (L*) that
also belongs to the Latin script.
<p class=issue>This definition is would replace ‘<code
class=css>alpha</code>’ as a simplification.
<dt><dfn id=alphanumeric
title="text-combine-horizontal:alphanumeric">alphanumeric</dfn>
<dd>Within the element, each sequence of consecutive horizontal digits
and/or letters that has as many or fewer characters than the integer
given is treated as if it were in an anonymous inline box with
‘<code class=css>text-combine-horizontal: all</code>’.
</dl>
<p class=issue>All values except ‘<code class=css>all</code>’
and ‘<code class=css>none</code>’ are marked at-risk. Which
ones should we take to CR?
<p>When combining text as for ‘<code
class=css>text-combine-horizontal: all</code>’, the glyphs of the
combined text are stacked horizontally (without line breaks,
letter-spacing, etc., but using the specified font settings), similar to
the contents of an inline-box with a horizontal writing mode and a
line-height of 1em. The effective size of the composition is assumed to be
1em square; anything outside the square is not measured for layout
purposes. The UA should center the glyphs horizontally and vertically
within the measured 1em square. The baseline of the resulting composition
chosen such that the square is centered between the text-over and
text-under baselines of its parent inline box prior to any baseline
alignment shift. For text layout purposes, e.g. bidi ordering,
line-breaking, emphasis marks, text-decoration, etc. the resulting
composition is treated as a single glyph representing the Object
Replacement Character U+FFFC.
<p>In some fonts, the ideographic glyphs are given a compressed design such
that they are 1em wide but shorter than 1em tall. To accommodate such
fonts, the UA may vertically scale the contents of the composition to
match the advance height of 水 U+6C34.
<!-- 水 U+6C34 was chosen because it is a very basic character common to
all Han-based scripts, so would have to appear in any usable ideographic
font; and its shape is very full in both dimensions, so it would be
unlikely to be shortened in a proportional font -->
<p>Any CSS fullwidth transformations (‘<code
class=css>text-transform: full-width</code>’ <a href="#CSS3TEXT"
rel=biblioentry>[CSS3TEXT]<!--{{CSS3TEXT}}--></a> or ‘<code
class=css>font-variant-east-asian-width: full-width</code>’ <a
href="#CSS3FONT" rel=biblioentry>[CSS3FONT]<!--{{CSS3FONT}}--></a>) are
turned off for combined text of more than one character.
<div class=example>
<p>In East Asian documents, the ‘<a
href="#text-combine-horizontal0"><code
class=css>text-combine-horizontal</code></a>’ effect is often used
to display Latin-based strings such as components of a date or letters of
an initialism, always in a horizontal writing mode regardless of the
writing mode of the line:</p>
<div class=figure>
<p><img alt="Diagram of tate-chu-yoko, showing the two digits of a date
set halfwidth side-by-side in a vertical column of text" class=example
src=tate-chu-yoko.png>
<p class=caption>Example of horizontal-in-vertical <i
lang=ja>tate-chu-yoko</i></p>
</div>
<p>The figure is the result of the rules</p>
<pre>
<!-- -->date { text-combine-horizontal: digits 2; }
</pre>
<p>and the following markup:</p>
<pre>
<!-- --><date>平成20年4月16日に</date>
</pre>
<p>In Japanese, this effect is known as <i lang=ja>tate-chu-yoko</i>.
</div>
<div class=example>
<p>The following example shows that applying ‘<code
class=css>text-combine-horizontal: digits 2</code>’ to an entire
document, rather than to a segment with a known type of numeric content,
can have unintended consequences:
<pre><p>あれは10,000円ですよ!</p></pre>
<div class=figure>
<p><img alt="Rendering of the above markup with 'text-combine-horizontal:
digits': the first two digits of the number are rendered as
tate-chu-yoko while the rest of the number is rendered sideways."
class=example src=bad-tate-chu-yoko.png>
<p class=caption>Example of mis-applied <i lang=ja>tate-chu-yoko</i></p>
</div>
</div>
<h3 id=text-combine-mode><span class=secno>9.2. </span>
Horizonal-in-Vertical Glyph Scaling: the ‘<a
href="#text-combine-mode0"><code
class=property>text-combine-mode</code></a>’ property</h3>
<table class=propdef>
<tbody>
<tr>
<th>Name:
<td><dfn id=text-combine-mode0>text-combine-mode</dfn>
<tr>
<th>Value:
<td>auto | compress | [ no-compress || use-glyphs ]
<tr>
<th>Initial:
<td>auto
<tr>
<th>Applies to:
<td>non-replaced inline elements
<tr>
<th>Inherited:
<td>yes
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>specified value
</table>
<p>This property controls how multiple characters are combined into the
space of a single character when specified to do so via ‘<a
href="#text-combine-horizontal0"><code
class=property>text-combine-horizontal</code></a>’. Values have the
following meanings:
<dl>
<dt><dfn id=auto title="text-combine-mode:auto">auto</dfn>
<dd>If the contents are wider than 1em, the UA must attempt to fit the
contents within 1em, but may use any method to do so.
<dt><dfn id=compress title="text-combine-mode:compress">compress</dfn>
<dd>Compress the composition (horizontally) as a whole until it fits
within 1em. Do not substitute alternate-width glyphs.
<dt><dfn id=use-glyphs
title="text-combine-mode:use-glyphs">use-glyphs</dfn>
<dd>Attempt to substitute narrower glyphs as necessary to make the
composition fit within 1em:
<ul>
<li>a two-character composition uses 1/2-em or proportional glyphs
<li>a three-character composition uses 1/3-em glyphs (if the font
supports this feature, else fall back to 1/2-em or proportional glyphs)
<li>etc.
</ul>
<p>Since even fonts that have fractional-width glyphs available do not
have such glyphs for all characters, the UA must ensure the expected
advance width for ‘<code class=css>use-glyphs</code>’ by
either compressing or padding (equally on both sides) each glyph
individually if it does not match the required advance width. (This step
does not apply if ‘<code class=css>no-compress</code>’ is
specified.)
<dt><dfn id=no-compress
title="text-combine-mode:no-compress">no-compress</dfn>
<dd>Do not compress the composition or perform any glyph substitution in
order to make the composition fit within 1em. When combined with
‘<code class=css>use-glyphs</code>’, however, this indicates
to perform glyph substitution if possible per ‘<code
class=css>use-glyphs</code>’ but not to compress the glyphs if they
do not fit the size requirements. This value may cause the glyphs to
overflow the line significantly.
</dl>
<h2 class=no-num id=changes>Changes</h2>
<h3 class=no-num id=recent-changes> Changes from the <a
href="http://www.w3.org/TR/2011/WD-css3-writing-modes-20110531/">May 2011
CSS Writing Modes Module Level 3 <abbr title="Working Draft">WD</abbr></a></h3>
<p>Major changes include:
<ul>
<li>Redefined which side of a bidi-broken box's border is drawn.
<li>Altered the allowed combinations of ‘<a
href="#unicode-bidi0"><code class=property>unicode-bidi</code></a>’
values and defined ‘<a href="#plaintext"><code
class=css>plaintext</code></a>’ to use heuristics for inline
elements as well.
<li>Renamed ‘<code class=css>vertical-right</code>’ value of
‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’ to ‘<a
href="#upright-right"><code class=css>upright-right</code></a>’.
<li>Renamed ‘<code class=css>rotate</code>’ values of
‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’ to ‘<a
href="#sideways"><code class=property>sideways</code></a>’.
<li>Renamed ‘<code class=css>auto</code>’ value of ‘<a
href="#text-orientation0"><code
class=property>text-orientation</code></a>’ to ‘<a
href="#use-glyph-orientation"><code
class=css>use-glyph-orientation</code></a>’ and marked it at-risk.
<li>Tweaked rules for vertical typesetting to remove references to
<code>vrt2</code> feature, fix various errors and omissions in <a
href="#vertical-typesetting-details">synthesis rules</a>, etc.
<li>Renamed ‘<code class=property>text-combine</code>’
property to ‘<a href="#text-combine-horizontal0"><code
class=property>text-combine-horizontal</code></a>’ and added
ability to auto-combine by character classes.
<li>Added ‘<a href="#text-combine-mode0"><code
class=property>text-combine-mode</code></a>’ property to control
scaling method used to compose horizontal-in-vertical text.
<li>Added appendix on <a href="#character-properties">Characters and
Properties</a>.
</ul>
<h2 id=conformance><span class=secno>10. </span> Conformance</h2>
<h3 id=conventions><span class=secno>10.1. </span> Document Conventions</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>All of the text of this specification is normative except sections
explicitly marked as non-normative, examples, and notes. <a
href="#RFC2119" rel=biblioentry>[RFC2119]<!--{{!RFC2119}}--></a>
<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:
<div class=example>
<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 class=note>Note, this is an informative note.
<h3 id=conformance-classes><span class=secno>10.2. </span> Conformance
Classes</h3>
<p>Conformance to CSS Writing Modes Level 3 is defined for three
conformance classes:
<dl>
<dt><dfn id=style-sheet title="style sheet!!as conformance class">style
sheet</dfn>
<dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
style sheet</a>.
<dt><dfn id=renderer>renderer</dfn>
<dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
that interprets the semantics of a style sheet and renders documents that
use them.
<dt><dfn id=authoring-tool>authoring tool</dfn>
<dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
that writes a style sheet.
</dl>
<p>A style sheet is conformant to CSS Writing Modes Level 3 if all of its
declarations that use properties defined in this module have values that
are valid according to the generic CSS grammar and the individual grammars
of each property as given in this module.
<p>A renderer is conformant to CSS Writing Modes Level 3 if, in addition to
interpreting the style sheet as defined by the appropriate specifications,
it supports all the features defined by CSS Writing Modes Level 3 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>An authoring tool is conformant to CSS Writing Modes Level 3 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.
<h3 id=partial><span class=secno>10.3. </span> Partial Implementations</h3>
<p>So that authors can exploit the forward-compatible parsing rules to
assign fallback values, CSS renderers <strong>must</strong> treat as
invalid (and <a
href="http://www.w3.org/TR/CSS21/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.
In particular, user agents <strong>must not</strong> selectively ignore
unsupported component 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.
<h3 id=experimental><span class=secno>10.4. </span> Experimental
Implementations</h3>
<p>To avoid clashes with future CSS features, the CSS2.1 specification
reserves a <a
href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
syntax</a> for proprietary and experimental extensions to CSS.
<p>Prior to a specification reaching the Candidate Recommendation stage in
the W3C process, all implementations of a CSS feature are considered
experimental. The CSS Working Group recommends that implementations use a
vendor-prefixed syntax for such features, including those in W3C Working
Drafts. This avoids incompatibilities with future changes in the draft.
<h3 id=testing><span class=secno>10.5. </span>Non-Experimental
Implementations</h3>
<p>Once a specification reaches the Candidate Recommendation stage,
non-experimental implementations are possible, and implementors should
release an unprefixed implementation of any CR-level feature they can
demonstrate to be correctly implemented according to spec.
<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>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.
<h3 id=cr-exit-criteria><span class=secno>10.6. </span> CR Exit Criteria</h3>
<p> For this specification to be advanced to Proposed Recommendation, there
must be at least two independent, interoperable implementations of each
feature. Each feature may be implemented by a different set of products,
there is no requirement that all features be implemented by a single
product. For the purposes of this criterion, we define the following
terms:
<dl>
<dt>independent
<dd>each implementation must be developed by a different party and cannot
share, reuse, or derive from code used by another qualifying
implementation. Sections of code that have no bearing on the
implementation of this specification are exempt from this requirement.
<dt>interoperable
<dd>passing the respective test case(s) in the official CSS test suite,
or, if the implementation is not a Web browser, an equivalent test. Every
relevant test in the test suite should have an equivalent test created if
such a user agent (UA) is to be used to claim interoperability. In
addition if such a UA is to be used to claim interoperability, then there
must one or more additional UAs which can also pass those equivalent
tests in the same way for the purpose of interoperability. The equivalent
tests must be made publicly available for the purposes of peer review.
<dt>implementation
<dd>a user agent which:
<ol class=inline>
<li>implements the specification.
<li>is available to the general public. The implementation may be a
shipping product or other publicly available version (i.e., beta
version, preview release, or “nightly build”). Non-shipping product
releases must have implemented the feature(s) for a period of at least
one month in order to demonstrate stability.
<li>is not experimental (i.e., a version specifically designed to pass
the test suite and is not intended for normal usage going forward).
</ol>
</dl>
<p>The specification will remain Candidate Recommendation for at least six
months.
<h2 class=no-num id=acknowledgements> Acknowledgements</h2>
<p>John Daggett, Martin Heijdra, Yasuo Kida, Tatsuo Kobayashi, Toshi
Kobayashi, Ken Lunde, Nat McCully, Paul Nelson, Kenzou Onozawa, Michel
Suignard, Taro Yamamoto, Steve Zilles
<h2 class=no-num id=character-properties>Appendix A. Characters and
Properties</h2>
<p>Unicode defines three codepoint-level properties that are referenced in
CSS Writing Modes:
<dl>
<dt><a href="http://www.unicode.org/reports/tr11/#Definitions">East Asian
width</a>
<dd>Defined in <a href="#UAX11"
rel=biblioentry>[UAX11]<!--{{!UAX11}}--></a> and given as the
East_Asian_Width property in the Unicode Character Database <a
href="#UAX44" rel=biblioentry>[UAX44]<!--{{!UAX44}}--></a>.
<dt><a
href="http://www.unicode.org/reports/tr44/#General_Category_Values">General
Category</a>
<dd>Defined in <a href="#UAX44"
rel=biblioentry>[UAX44]<!--{{!UAX44}}--></a> and given as the
General_Category property in the Unicode Character Database <a
href="#UAX44" rel=biblioentry>[UAX44]<!--{{!UAX44}}--></a>.
<dt><a href="http://www.unicode.org/reports/tr24/#Values">Script
property</a>
<dd>Defined in <a href="#UAX24"
rel=biblioentry>[UAX24]<!--{{!UAX24}}--></a> and given as the Script
property in the Unicode Character Database <a href="#UAX44"
rel=biblioentry>[UAX44]<!--{{!UAX44}}--></a>. (UAs should include any
ScriptExtensions.txt assignments in this mapping.)
</dl>
<p id=grapheme-cluster>In several sections (as noted), the term <dfn
id=character>character</dfn> is defined as <em>extended grapheme
cluster</em> per <a href="#UAX29"
rel=biblioentry>[UAX29]<!--{{!UAX29}}--></a>. It is roughly equivalent to
what a language user considers to be a character or a basic unit of the
script (which might not be a single Unicode codepoint). The UA may further
tailor this definition as allowed by Unicode.
<p>Unicode defines properties for characters, but for ‘<a
href="#text-orientation0"><code
class=property>text-orientation</code></a>’ and <a
href="#vertical-typesetting-details">Vertical Typesetting Synthesis</a>,
it is necessary to determine the properties of a grapheme cluster. For the
purposes of CSS Writing Modes, the properties of a grapheme cluster are
given by its base character—except in two cases:
<ul>
<li>Grapheme clusters formed with an Enclosing Mark (Me) of the Common
script are considered to be Other Symbols (So) in the Common script. They
are assumed to have the same Unicode properties as the Replacement
Character U+FFFD.
<li>Grapheme clusters formed with a Space Separator (Zs) as the base are
considered to be Modifier Symbols (Sk). They are assumed to have the same
East Asian Width property as the base, but take their other properties
from the first combining character in the sequence.
</ul>
<h2 class=no-num id=script-orientations>Appendix B: Bi-orientational
Transformations</h2>
<p><em>This section is normative.</em>
<p>This appendix gives the orientational properties of scripts in Unicode
6.0 <a href="#UNICODE" rel=biblioentry>[UNICODE]<!--{{!UNICODE}}--></a>.
Any script not listed explicitly is assumed to be <i>horizontal-only</i>.
The script classification of Unicode characters is given by <a
href="#UAX24" rel=biblioentry>[UAX24]<!--{{!UAX24}}--></a>.
<table class=data>
<caption>Vertical Scripts and their Bi-orientational Transform</caption>
<thead>
<tr>
<th>Code
<th>Name
<th>Transform
<tbody>
<tr>
<td>Bopo
<td>Bopomofo
<td>translate
<tr>
<td>Egyp
<td>Egyptian Hieroglyphs
<td>translate
<tr>
<td>Hira
<td>Hiragana
<td>translate
<tr>
<td>Kana
<td>Katakana
<td>translate
<tr>
<td>Hani
<td>Han
<td>translate
<tr>
<td>Hang
<td>Hangul
<td>translate
<tr>
<td>Mong
<td>Mongolian
<td>rotate
<tr>
<td>Phag
<td>Phags Pa
<td>rotate
<tr>
<td>Yiii
<td>Yi
<td>translate
</table>
<p><strong>Exceptions:</strong> For the purposes of this specification, all
fullwidth (F) and wide (W) characters are treated as belonging to a
vertical script with a translate bi-orientational transform. All halfwidth
(H) characters are treated as belonging to a vertical script with a rotate
bi-orientational transform. <a href="#UAX11"
rel=biblioentry>[UAX11]<!--{{!UAX11}}--></a> Neutral (N), narrow (Na) and
ambiguous (A) Letters (L*) belonging to the Common script are treated as
belonging to a horizontal-only script.
<p class=note>Ogham is also a rotating bi-orientational script, but because
it is a bottom-to-top script, for the purposes of this specification it is
treated as left-to-right horizontal. A future version of CSS may define
proper handling of bottom-to-top scripts. Authors can work around this
lack of support with the ‘<a href="#sideways-left"><code
class=css>sideways-left</code></a>’ value of ‘<a
href="#text-orientation0"><code
class=property>text-orientation</code></a>’.
<h2 class=no-num id=vertical-typesetting-details>Appendix C: Vertical
Typesetting Synthesis</h2>
<p>This section defines an algorithm for automatic typesetting of vertical
text. For readability, the term <a href="#character"><i>character</i></a>
is used in place of <em>extended grapheme cluster</em> in this section.
See <a href="#character-properties">Characters and Properties</a> for
further details.
<p class=issue>This section needs careful review. Please send feedback and
suggestions for improvement, particularly for the <a
href="http://unicode.org/cldr/utility/list-unicodeset.jsp?a=\p{Block%3DGeneral+Punctuation}%26[%3AGeneral_category%3DPo%3A]%0D%0A&g=">U+2016–U+205F</a>
range.
<p>When ‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’ is either ‘<a
href="#upright-right"><code class=css>upright-right</code></a>’ or
‘<a href="#upright"><code class=css>upright</code></a>’, the
following settings are recommended:
<ol>
<li>Set any spaces (Zs), connectors (Pc), and bracketing punctuation (Ps,
Pe, Pi, Pf) either upright using vertical font settings if available or
sideways if they are not.
<p class=note>Thus a THREE-PER-EM SPACE (U+2004) can be expected to
provide a 1/3-em advance in the inline dimension, and brackets can be
expected to encase their contents.</p>
<li>Set East Asian fullwidth (F) and wide (W) characters upright (using
vertical font settings if available).
<li>Set any dashes (Pd) either upright using vertical font settings if
available or sideways if they are not.
<!-- fullwidth hyphen-minus need to be upright -->
<li>Set East Asian halfwidth (H) characters sideways (or upright with
vertical font settings if possible).
<li>Set any other characters that are assigned to a script (i.e. do not
belong to the Common, Inherited, or Unknown scripts) as required by
‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’ and <a
href="#script-orientations">Appendix B</a>.
</ol>
<p>When ‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’ is ‘<a
href="#upright-right"><code class=css>upright-right</code></a>’, the
following settings are recommended for characters not otherwise-specified
above:
<ol>
<li>Set the following characters using vertical font settings if
available, otherwise set them sideways:
<ul>
<li>Other Punctuation (Po) with an East Asian Width width of ambiguous
(A).
<li><abbr title="U+00B2, U+00B3, U+00B9, U+20070,
U+2074–U+2079">Superscripts</abbr>, <abbr
title="U+2080–U+2089">subscripts</abbr>, and non-Indic <abbr
title="U+00BC–U+00BE, U+2150–U+215F, U+2189">fractions</abbr> from
the Other Number (No) category.
<li>Private Use characters (Co).
</ul>
<li>Set the following characters sideways (i.e. rotated, using horizontal
font settings).
<ul>
<li>Currency Symbols (Sc), Math Symbols (Sm), and Modifier Symbols (Sk)
<li><abbr title="U+10107–U+10133">Aegean numbers</abbr> and <abbr
title="U+A830–U+A835">North Indic fractions</abbr> from the Other
Number (No) category.
<li>All characters from the <abbr title="U+2500–U+257F">Box
Drawing</abbr> and <abbr title="U+2580–U+259F">Block Elements</abbr>
blocks
<li>All directional arrows: the <abbr
title="U+2190–U+21FF">Arrows</abbr> block, the <abbr
title="U+261A–U+261F">Pointing hand symbols</abbr> from the
Miscellaneous Symbols block, any <abbr title="U+2B00–U+2B11,
U+2B45–U+2B46">arrow</abbr> from the Miscellaneous Symbols and Arrows
block, any <abbr title="U+2794–U+27BE">Dingbat arrows</abbr> from the
Dingbats block
<li>Other Symbols (So) from the Latin-1 Supplement and Letterlike
Symbols blocks.
<li>Other Symbols (So) from the Aegean Numbers, Ancient Symbols, Common
Indic Number Forms blocks
</ul>
<li>Set the following characters upright (i.e. translated, using vertical
font settings if available):
<ul>
<li>All Other Symbols (So) characters not otherwise specified above.
<li>All Other Numbers (No) characters not otherwise specified above.
</ul>
<li>Set all other characters sideways (i.e. rotated, using horizontal font
settings).
</ol>
<p>When ‘<a href="#text-orientation0"><code
class=property>text-orientation</code></a>’ is ‘<a
href="#upright"><code class=css>upright</code></a>’, set all
characters upright (using vertical font settings if available) unless
otherwise specified above.
<p class=note>In OpenType, vertical font settings are provided by the
<code>vhea</code>, <code>vmtx</code>, and <code>VORG</code> tables, as
well as the <code>vert</code> and <code>vrt2</code> GSUB features. If any
of these are present, the font is considered to have vertical font
settings available.
<p class=issue>It is a Unicode error that ScriptExtensions.txt does not
include the Aegean and Common Indic characters listed above as exceptions;
they shouldn't need special treatment once this is fixed.
<h2 class=no-num id=intrinsic-sizing>Appendix D: Intrinsic Dimensions</h2>
<p><em>This section is normative.</em>
<p>CSS layout has several different concepts of automatic sizing that are
used in various layout calculations. This section defines some more
precise terminology to help connect the layout behaviors of this spec to
the calculations used in other modules, and some new keywords for the
width and height properties to allow authors to assign elements the
dimensions resulting from these size calculations.
<table class=propdef>
<tbody>
<tr>
<th>Properties:
<td>‘<code class=property>width</code>’, ‘<code
class=property>min-width</code>’, ‘<code
class=property>max-width</code>’, ‘<code
class=property>height</code>’, ‘<code
class=property>min-height</code>’, ‘<code
class=property>max-height</code>’
<tr>
<th>New Values:
<td>‘<a href="#min-content"><code
class=css>min-content</code></a>’ | ‘<a
href="#max-content"><code class=css>max-content</code></a>’ |
‘<a href="#fill-available"><code
class=css>fill-available</code></a>’ | ‘<a
href="#fit-content"><code class=css>fit-content</code></a>’
<tr>
<th>Initial:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<tr>
<th>Applies to:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<tr>
<th>Inherited:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<tr>
<th>Percentages:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<tr>
<th>Media:
<td>as defined in <a href="#CSS21"
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
<tr>
<th>Computed value:
<td>specified value if keyword specified, else as defined in <a
href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
</table>
<p>There are four types of automatically-determined sizes in CSS (which are
represented in the width and height properties by the keywords defined
above):
<!-- XXX Make these anchors dated once CSS2.1 hits REC, since we might
decide to fix these gross editorial inconsistencies at some point in
the errata. -->
<dl>
<dt><dfn id=min-content>min-content</dfn>
<dd>Called the <i>preferred minimum width</i> in <a
href="http://www.w3.org/TR/CSS21/visudet.html#float-width">CSS2.1§10.3.5</a>
and the <i>minimum content width</i> in <a
href="http://www.w3.org/TR/CSS21/tables.html#auto-table-layout">CSS2.1§5.2.2</a>,
the <dfn id=min-content-measure>min-content measure</dfn> is defined
roughly as the narrowest measure a box could take while fitting around
its contents if <em>all</em> line break opportunities within the box were
taken.
<dt><dfn id=max-content>max-content</dfn>
<dd>Called the <i>preferred width</i> in <a
href="http://www.w3.org/TR/CSS21/visudet.html#float-width">CSS2.1§10.3.5</a>
and the <i>maximum cell width</i> in <a
href="http://www.w3.org/TR/CSS21/tables.html#auto-table-layout">CSS2.1§5.2.2</a>,
the <dfn id=max-content-measure>max-content measure</dfn> is defined
roughly as the narrowest measure a box could take while fitting around
its contents if <em>none</em> of the optional line break opportunities
within the box were taken.
<dt><dfn id=fill-available>fill-available</dfn>
<dd>Called the <i>available width</i> in <a
href="http://www.w3.org/TR/CSS21/visudet.html#float-width">CSS2.1§10.3.5</a>
and computed by the rules in <a
href="http://www.w3.org/TR/CSS21/visudet.html#blockwidth">CSS2.1§10.3.3</a>,
the <dfn id=fill-available-measure>fill-available measure</dfn> is
calculated by subtracting out the element's margins, borders, and padding
from the <a href="#available-measure"><i>available measure</i></a> and
flooring the result at zero. If the available measure is infinite, then a
<dfn id=fallback-measure>fallback measure</dfn> is used in place of the
<a href="#available-measure"><i>available measure</i></a> in this
calculation. (In the case of orthogonal flows, this is the measure of the
initial containing block.) The <dfn
id=fill-available-extent>fill-available extent</dfn> is similarly
calculated by using the corresponding values from the block dimension.
<dt><dfn id=fit-content>fit-content</dfn>
<dd>Called the <i>shrink-to-fit</i> width in <a
href="http://www.w3.org/TR/CSS21/visudet.html#float-width">CSS2.1§10.3.5</a>,
and <a href="http://www.w3.org/TR/css3-multicol/#pseudo-algorithm">CSS
Multi-column Layout § 3.4</a>, the <dfn
id=fit-content-measure>fit-content measure</dfn> is defined as
<code>max(<a href="#min-content"><i>min-content</i></a>, min(<a
href="#max-content"><i>max-content</i></a>, <a
href="#fill-available"><i>fill-available</i></a>))</code> if the
available measure is finite, and as the <a
href="#max-content"><i>max-content</i></a> measure otherwise. The <dfn
id=fit-content-extent>fit-content extent</dfn> is calculated from the
same expression applied to the block dimension.
</dl>
<p>For the layout models in CSS2.1, both the <dfn
id=min-content-extent>min-content extent</dfn> and <dfn
id=max-content-extent>max-content extent</dfn> of non-replaced elements
are defined as the content extent as defined (for horizontal writing
modes) in <a
href="http://www.w3.org/TR/CSS21/visudet.html#normal-block">CSS2.1§10.6.3</a>
and <a
href="http://www.w3.org/TR/CSS21/tables.html#height-layout">CSS2.1§17.5.3</a>
for elements with ‘<code class=css>height: auto</code>’.
<p>For replaced elements, the <a href="#min-content"><i>min-content</i></a>
and <a href="#max-content"><i>max-content</i></a> sizes are the same and
correspond used size of the replaced element according to the ‘<code
class=css>auto</code>’ width and height calculations.
<h3 class=no-num id=multicol-intrinsic> Intrinsic Sizes in Multi-column
Layout</h3>
<p>The <a href="#min-content"><i>min-content</i></a> and <a
href="#max-content"><i>max-content</i></a> sizes of a multi-column element
are undefined per <a href="#CSS3COL"
rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a>. A future specification
may define them. <!-- Sketchbook area. See
http://lists.w3.org/Archives/Public/www-style/2011Apr/0316.html
http://lists.w3.org/Archives/Public/www-style/2011May/0468.html
<h4 id="multicol-intrinsic-measures">
Intrinsic Sizes for Multi-column Elements</h4>
<p class="issue">This section is under discussion and may be removed</p>
<dl>
<dt>min-content</dt>
<dd>The <i>min-content</i> measure of the multi-column element is
the <i>min-content</i> measure of the multi-column element's
contents.
<dt>max-content</dt>
</dl>
<p>For multi-column elements laid out with infinite available measure (see
<a href="#orthogonal-multicol">Multi-column Layout in Orthogonal Flows</a>),
the <i>min-content</i> extent is the extent that would result
from taking every permissible pagination break as a column break, and the
<i>max-content</i> extent is the extent that would result from taking
only the forced breaks. For all other multi-column elements it is, like
CSS2.1 block-level boxes, the extent that would be calculated for an
''auto'' extent per [[CSS3MULTICOL]].
NOTES FROM ROSSEN:
min-content measure is min(column-width, min-content)
max-content measure is
1. Pass w/ colspans displ: none;
Get width
2. Pass with colspans only in width
Get remaining height
3. Pass w/ spans again using remaining height
Get width
4. Layout in width as final
Will lay out perfectly without colspans; will have some slack but no
overflow when colspans present.
<h4 id="multicol-intrinsic-columns">
Intrinsic Sizes for Columns</h4>
-->
<table class=propdef>
<tbody>
<tr>
<th>Property:
<td>‘<code class=property>column-width</code>’
<tr>
<th>New Values:
<td>‘<a href="#min-content"><code
class=css>min-content</code></a>’ | ‘<a
href="#max-content"><code class=css>max-content</code></a>’ |
‘<a href="#fill-available"><code
class=css>fill-available</code></a>’ | ‘<a
href="#fit-content"><code class=css>fit-content</code></a>’
<tr>
<th>Initial:
<td>as defined in <a href="#CSS3COL"
rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a>
<tr>
<th>Applies to:
<td>as defined in <a href="#CSS3COL"
rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a>
<tr>
<th>Inherited:
<td>as defined in <a href="#CSS3COL"
rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a>
<tr>
<th>Percentages:
<td>as defined in <a href="#CSS3COL"
rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a>
<tr>
<th>Media:
<td>as defined in <a href="#CSS3COL"
rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a>
<tr>
<th>Computed value:
<td>specified value if keyword specified, else as defined in <a
href="#CSS3COL" rel=biblioentry>[CSS3COL]<!--{{!CSS3COL}}--></a>
</table>
<p>When used as values for <a
href="http://www.w3.org/TR/css3-multicol/#cw">‘<code
class=property>column-width</code>’</a>, the new keywords specify
the optimal column width:
<dl>
<dt>‘<a href="#min-content"><code
class=css>min-content</code></a>’
<dd>Specifies the optimal column width as the <a
href="#min-content-measure"><i>min-content measure</i></a> of the
multi-column element's contents.
<dt>‘<a href="#max-content"><code
class=css>max-content</code></a>’
<dd>Specifies the optimal column width as the <a
href="#max-content-measure"><i>max-content measure</i></a> of the
multi-column element's contents.
<dt>‘<a href="#fill-available"><code
class=css>fill-available</code></a>’
<dd>Specifies the optimal column width as the <a
href="#fill-available-measure"><i>fill-available measure</i></a> of the
multi-column element.
<dt>‘<a href="#fit-content"><code
class=css>fit-content</code></a>’
<dd>Specifies the optimal column width as <code>max(<a
href="#min-content"><i>min-content</i></a>, min(<a
href="#max-content"><i>max-content</i></a>, <a
href="#fill-available"><i>fill-available</i></a>))</code>.
</dl>
<h2 class=no-num id=bidi-html> Appendix E: Bidi Rules for HTML</h2>
<p>The style sheet rules that would achieve the bidi behaviors specified in
<a href="#HTML401" rel=biblioentry>[HTML401]<!--{{HTML401}}--></a> for the
HTML Strict doctype are given below:
<pre>
/* HTML dir attribute creates an embedding */
*[dir="ltr"] { direction: ltr; unicode-bidi: embed; }
*[dir="rtl"] { direction: rtl; unicode-bidi: embed; }
/* BDO element creates an override */
bdo[dir="ltr"] { direction: ltr; unicode-bidi: bidi-override; }
bdo[dir="rtl"] { direction: rtl; unicode-bidi: bidi-override; }
/* HTML4.01:8.2.6 - preserve bidi behavior if 'display' is changed */
html, body,
div, address, blockquote, p,
ul, ol, li, dl, dt, dd,
fieldset, form,
h1, h2, h3, h4, h5, h6,
{ unicode-bidi: isolate; }
</pre>
<h2 class=no-num id=references> References</h2>
<h3 class=no-num id=normative-references> Normative references</h3>
<!--begin-normative-->
<!-- Sorted by label -->
<dl class=bibliography>
<dt style="display: none"><!-- keeps the doc valid if the DL is empty -->
<!---->
<dt id=CSS21>[CSS21]
<dd>Bert Bos; et al. <a
href="http://www.w3.org/TR/2011/REC-CSS2-20110607"><cite>Cascading Style
Sheets Level 2 Revision 1 (CSS 2.1) Specification.</cite></a> 7 June
2011. W3C Recommendation. URL: <a
href="http://www.w3.org/TR/2011/REC-CSS2-20110607">http://www.w3.org/TR/2011/REC-CSS2-20110607</a>
</dd>
<!---->
<dt id=CSS3BG>[CSS3BG]
<dd>Bert Bos; Elika J. Etemad; Brad Kemper. <a
href="http://www.w3.org/TR/2011/CR-css3-background-20110215"><cite>CSS
Backgrounds and Borders Module Level 3.</cite></a> 15 February 2011. W3C
Candidate Recommendation. (Work in progress.) URL: <a
href="http://www.w3.org/TR/2011/CR-css3-background-20110215">http://www.w3.org/TR/2011/CR-css3-background-20110215</a>
</dd>
<!---->
<dt id=CSS3COL>[CSS3COL]
<dd>Håkon Wium Lie. <a
href="http://www.w3.org/TR/2011/CR-css3-multicol-20110412"><cite>CSS
Multi-column Layout Module.</cite></a> 12 April 2011. W3C Candidate
Recommendation. (Work in progress.) URL: <a
href="http://www.w3.org/TR/2011/CR-css3-multicol-20110412">http://www.w3.org/TR/2011/CR-css3-multicol-20110412</a>
</dd>
<!---->
<dt id=RFC2119>[RFC2119]
<dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
words for use in RFCs to Indicate Requirement Levels.</cite></a> Internet
RFC 2119. URL: <a
href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
</dd>
<!---->
<dt id=SVG11>[SVG11]
<dd>Erik Dahlström; et al. <a
href="http://www.w3.org/TR/2011/PR-SVG11-20110609/"><cite>Scalable Vector
Graphics (SVG) 1.1 (Second Edition).</cite></a> 9 June 2011. W3C Proposed
Recommendation. (Work in progress.) URL: <a
href="http://www.w3.org/TR/2011/PR-SVG11-20110609/">http://www.w3.org/TR/2011/PR-SVG11-20110609/</a>
</dd>
<!---->
<dt id=UAX11>[UAX11]
<dd>Asmus Freytag. <a
href="http://www.unicode.org/unicode/reports/tr11/tr11-8.html"><cite>East
Asian Width.</cite></a> 23 March 2001. Unicode Standard Annex #11. URL:
<a
href="http://www.unicode.org/unicode/reports/tr11/tr11-8.html">http://www.unicode.org/unicode/reports/tr11/tr11-8.html</a>
</dd>
<!---->
<dt id=UAX24>[UAX24]
<dd>Mark Davis; Ken Whistler. <a
href="http://www.unicode.org/reports/tr24/"><cite>Unicode Script
Property.</cite></a> 27 September 2010. Unicode Standard Annex #24. URL:
<a
href="http://www.unicode.org/reports/tr24/">http://www.unicode.org/reports/tr24/</a>
</dd>
<!---->
<dt id=UAX29>[UAX29]
<dd>Mark Davis. <a
href="http://www.unicode.org/reports/tr29/tr29-17.html"><cite>Unicode
Text Segmentation.</cite></a> 8 October 2010. Unicode Standard Annex #29.
URL: <a
href="http://www.unicode.org/reports/tr29/tr29-17.html">http://www.unicode.org/reports/tr29/tr29-17.html</a>
</dd>
<!---->
<dt id=UAX44>[UAX44]
<dd>Mark Davis; Ken Whistler. <a
href="http://www.unicode.org/reports/tr44/tr44-6.html"><cite>Unicode
Character Database.</cite></a> 8 October 2010. Unicode Standard Annex
#44. URL: <a
href="http://www.unicode.org/reports/tr44/tr44-6.html">http://www.unicode.org/reports/tr44/tr44-6.html</a>
</dd>
<!---->
<dt id=UNICODE>[UNICODE]
<dd>The Unicode Consortium. <a
href="http://www.unicode.org/unicode/standard/versions/enumeratedversions.html"><cite>The
Unicode Standard.</cite></a> 2003. Defined by: The Unicode Standard,
Version 4.0 (Boston, MA, Addison-Wesley, ISBN 0-321-18578-1), as updated
from time to time by the publication of new versions URL: <a
href="http://www.unicode.org/unicode/standard/versions/enumeratedversions.html">http://www.unicode.org/unicode/standard/versions/enumeratedversions.html</a>
</dd>
<!---->
</dl>
<!--end-normative-->
<h3 class=no-num id=other-references> Other references</h3>
<!--begin-informative-->
<!-- Sorted by label -->
<dl class=bibliography>
<dt style="display: none"><!-- keeps the doc valid if the DL is empty -->
<!---->
<dt id=CSS2>[CSS2]
<dd>Ian Jacobs; et al. <a
href="http://www.w3.org/TR/2008/REC-CSS2-20080411"><cite>Cascading Style
Sheets, level 2 (CSS2) Specification.</cite></a> 11 April 2008. W3C
Recommendation. URL: <a
href="http://www.w3.org/TR/2008/REC-CSS2-20080411">http://www.w3.org/TR/2008/REC-CSS2-20080411</a>
</dd>
<!---->
<dt id=CSS3COLOR>[CSS3COLOR]
<dd>Tantek Çelik; Chris Lilley; L. David Baron. <a
href="http://www.w3.org/TR/2011/REC-css3-color-20110607"><cite>CSS Color
Module Level 3.</cite></a> 7 June 2011. W3C Recommendation. URL: <a
href="http://www.w3.org/TR/2011/REC-css3-color-20110607">http://www.w3.org/TR/2011/REC-css3-color-20110607</a>
</dd>
<!---->
<dt id=CSS3FONT>[CSS3FONT]
<dd>John Daggett. <a
href="http://www.w3.org/TR/2011/WD-css3-fonts-20110324"><cite>CSS Fonts
Module Level 3.</cite></a> 24 March 2011. W3C Working Draft. (Work in
progress.) URL: <a
href="http://www.w3.org/TR/2011/WD-css3-fonts-20110324">http://www.w3.org/TR/2011/WD-css3-fonts-20110324</a>
</dd>
<!---->
<dt id=CSS3LIST>[CSS3LIST]
<dd>Tab Atkins Jr. <a
href="http://www.w3.org/TR/2011/WD-css3-lists-20110524"><cite>CSS Lists
and Counters Module Level 3.</cite></a> 24 May 2011. W3C Working Draft.
(Work in progress.) URL: <a
href="http://www.w3.org/TR/2011/WD-css3-lists-20110524">http://www.w3.org/TR/2011/WD-css3-lists-20110524</a>
</dd>
<!---->
<dt id=CSS3PAGE>[CSS3PAGE]
<dd>Håkon Wium Lie; Melinda Grant. <a
href="http://www.w3.org/TR/2006/WD-css3-page-20061010"><cite>CSS3 Module:
Paged Media.</cite></a> 10 October 2006. W3C Working Draft. (Work in
progress.) URL: <a
href="http://www.w3.org/TR/2006/WD-css3-page-20061010">http://www.w3.org/TR/2006/WD-css3-page-20061010</a>
</dd>
<!---->
<dt id=CSS3TEXT>[CSS3TEXT]
<dd>Elika J. Etemad; Koji Ishii; Shinyu Murakami. <a
href="http://www.w3.org/TR/2011/WD-css3-text-20110412/"><cite>CSS Text
Level 3.</cite></a> 12 April 2011. W3C Working Draft. (Work in progress.)
URL: <a
href="http://www.w3.org/TR/2011/WD-css3-text-20110412/">http://www.w3.org/TR/2011/WD-css3-text-20110412/</a>
</dd>
<!---->
<dt id=HTML401>[HTML401]
<dd>Dave Raggett; Arnaud Le Hors; Ian Jacobs. <a
href="http://www.w3.org/TR/1999/REC-html401-19991224"><cite>HTML 4.01
Specification.</cite></a> 24 December 1999. W3C Recommendation. URL: <a
href="http://www.w3.org/TR/1999/REC-html401-19991224">http://www.w3.org/TR/1999/REC-html401-19991224</a>
</dd>
<!---->
<dt id=UTN22>[UTN22]
<dd>Elika J. Etemad. <a href="http://unicode.org/notes/tn22/"><cite>Robust
Vertical Text Layout.</cite></a> 25 April 2005. Unicode Technical Note
#22. URL: <a
href="http://unicode.org/notes/tn22/">http://unicode.org/notes/tn22/</a></dd>
<!---->
</dl>
<!--end-informative-->
<h2 class=no-num id=property-index> Property Index</h2>
<!--begin-properties-->
<table class=proptable>
<thead>
<tr>
<th>Property
<th>Values
<th>Initial
<th>Applies to
<th>Inh.
<th>Percentages
<th>Media
<tbody>
<tr>
<th><a class=property href="#direction0">direction</a>
<td>ltr | rtl
<td>ltr
<td>all elements
<td>yes
<td>N/A
<td>visual
<tr>
<th><span class=property>‘caption-side’</span>
<td>‘before’ | ‘after’
<td>before
<td>same as CSS2.1
<td>same as CSS2.1
<td>same as CSS2.1
<td>same as CSS2.1
<tr>
<th><span class=property>‘column-width’</span>
<td>‘min-content’ | ‘max-content’ |
‘fill-available’ | ‘fit-content’
<td>as defined in [CSS3COL]
<td>as defined in [CSS3COL]
<td>as defined in [CSS3COL]
<td>as defined in [CSS3COL]
<td>as defined in [CSS3COL]
<tr>
<th><span class=property>‘width’</span>, <span
class=property>‘min-width’</span>, <span
class=property>‘max-width’</span>, <span
class=property>‘height’</span>, <span
class=property>‘min-height’</span>, <span
class=property>‘max-height’</span>
<td>‘min-content’ | ‘max-content’ |
‘fill-available’ | ‘fit-content’
<td>as defined in [CSS21]
<td>as defined in [CSS21]
<td>as defined in [CSS21]
<td>as defined in [CSS21]
<td>as defined in [CSS21]
<tr>
<th><a class=property
href="#text-combine-horizontal0">text-combine-horizontal</a>
<td>none | all | [ [digits <integer> | ascii-digits <integer> ] ||
[ alpha <integer> | latin <integer> ] || alphanumeric
<integer> ]
<td>none
<td>non-replaced inline elements
<td>yes
<td>N/A
<td>visual
<tr>
<th><a class=property href="#text-combine-mode0">text-combine-mode</a>
<td>auto | compress | [ no-compress || use-glyphs ]
<td>auto
<td>non-replaced inline elements
<td>yes
<td>N/A
<td>visual
<tr>
<th><a class=property href="#text-orientation0">text-orientation</a>
<td>upright-right | upright | sideways-right | sideways-left | sideways
| use-glyph-orientation
<td>upright-right
<td>all elements except table row groups, rows, column groups, and
columns
<td>yes
<td>N/A
<td>visual
<tr>
<th><a class=property href="#unicode-bidi0">unicode-bidi</a>
<td>normal | embed | [ isolate || bidi-override ] | plaintext
<td>normal
<td>all elements, but see prose
<td>no
<td>N/A
<td>visual
<tr>
<th><a class=property href="#writing-mode1">writing-mode</a>
<td>horizontal-tb | vertical-rl | vertical-lr
<td>horizontal-tb
<td>All elements except table row groups, table column groups, table
rows, and table columns
<td>yes
<td>N/A
<td>visual
</table>
<!--end-properties-->
<!-- Add alphabetic index? -->