@@ -7,50 +7,80 @@ Status: ED
77Group : csswg
88ED : http://dev.w3.org/csswg/css-logical-props/
99Editor : Rossen Atanassov, Microsoft, ratan@microsoft.com
10- Editor : fantasai, Mozilla , http://fantasai.inkedblade.net/contact
10+ Editor : fantasai, Invited Expert , http://fantasai.inkedblade.net/contact
1111Abstract : This module introduces logical properties and values that provide the author with the ability to control layout through logical, rather than physical, direction and dimension mappings. The module defines logical properties and values for the features defined in [CSS21]. These properties are writing-mode relative equivalents of their corresponding physical properties.
1212Ignored Terms : div, dl, dfn
13+ Link Defaults : css21 (property) width/height/min-width/min-height/max-width/max-height
1314</pre>
1415
16+ <h1 id="intro">
17+ Introduction</h1>
18+
19+ See [[!CSS3-WRITING-MODES]] <a href="http://www.w3.org/TR/css-writing-modes-3/#abstract-layout">Abstract Layout</a>
20+ for details on how to map between logical and physical terms.
21+ This mapping controls the interpretation of logical keywords and properties.
22+
1523<h2 id="logical-controls">
16- Logical Directional Values: before, after, start, end</h2>
24+ Logical Directional Values: ''block-start'', ''block-end'', ''inline- start'', ''inline- end'' </h2>
1725
18- Properties that accept physical directional keyword values ('top' , 'bottom' ,
19- 'left' , or 'right' ) are redefined to also accept the appropriate logical
20- directional keywords (''before'' , ''after'' , ''start'' , or ''end'' ). In such cases,
26+ Properties that accept physical directional keyword values
27+ ('top' , 'bottom' , 'left' , or 'right' ) are redefined
28+ to also accept the appropriate logical directional keywords.
29+ In such cases,
2130 the logical values can be used in place of the corresponding physical values.
2231 For properties that take multiple keywords, combinations of logical and
23- physical values are not allowed.
32+ physical values are not allowed (unless otherwise specified in a future specification) .
2433
25- The following properties accept the ''start'' and ''end'' keywords where 'left'
26- and 'right' are allowed:
27- <ul>
28- <li> 'caption-side' , if the 'left' and 'right' values are supported in
29- horizontal writing modes (See the <a href="#caption-side">section on
30- <code>caption-side</code></a> )
31- <li> 'clear'
32- <li> 'background-position'
33- <li> 'float'
34- <li> 'text-align'
35- </ul>
34+ Properties can be either 1-dimensional or 2-dimensional.
35+ When contextually constrained to one dimension,
36+ the logical keywords are shortened.
3637
37- The following properties accept the ''before'' and ''after'' keywords where
38- 'top' and 'bottom' are allowed:
39- <ul>
40- <li> 'caption-side'
41- </ul>
38+ <h3 id="caption-side">
39+ Logical Values for the 'caption-side' Property</h3>
4240
43- See the section on <a href="#abstract-layout">Abstract Layout</a>
44- details on how to map between logical and physical terms. This mapping
45- controls the interpretation of logical keywords.
41+ <pre class="propdef">
42+ Name : caption-side
43+ New values : block-start | block-end | inline-start | inline-end
44+ </pre>
4645
47- <p class="issue">
48- float needs coordination with GCPM where it defines page floats
46+ The 'caption-side' property is 1-dimensional in CSS2.1,
47+ but was 2-dimensional in CSS2.0,
48+ (and presumably will be 2-dimensional again in the next update to CSS tables).
49+ It therefore accepts the full set of logical directions.
50+ However, the ''inline-start'' and ''inline-end'' properties
51+ (which correspond to the behavior of the ''left'' and ''right'' values in CSS2.0)
52+ are only required to be supported by UAs that support ''left'' and ''right'' .
53+
54+ <h3 id="float-clear">
55+ Logical Values for the 'float' and 'clear' Properties</h3>
56+
57+ <pre class="propdef">
58+ Name : float, clear
59+ New values : inline-start | inline-end
60+ </pre>
61+
62+ Issue: Is this a 2-directional property? Should these just be ''start'' /''end'' ?
63+
64+ <h3 id="text-align">
65+ Logical Values for the 'text-align' Property</h3>
66+
67+ <pre class="propdef">
68+ Name : text-align
69+ New values : start | end
70+ </pre>
71+
72+ These values are normatively defined in [[!CSS3TEXT]] .
4973
5074 <p class="issue">
51- 'resize' accepts ''horizontal'' and ''vertical'' , and these terminologies
52- should be physical. should we add 'resize-x and resize-y' as logical
53- values?
75+ float needs coordination with GCPM where it defines page floats
76+
77+ <h3 id="resize">
78+ Logical Values for the 'text-align' Property</h3>
79+
80+ <pre class="propdef">
81+ Name : resize
82+ New values : block | inline
83+ </pre>
5484
5585<h2 id="logical-page">
5686Logical Page Classifications</h2>
@@ -63,6 +93,7 @@ Logical Page Classifications</h2>
6393 or later side of a spread, rather than to the left or right side of a
6494 spread, this module introduces the following additional keywords for the
6595 'page-break-after' and 'page-break-before' properties [[!CSS21]] :
96+
6697 <dl dfn-type="value" dfn-for="logical-page">
6798 <dt> <dfn>recto</dfn>
6899 <dd>
@@ -75,15 +106,9 @@ Logical Page Classifications</h2>
75106 and 'right' in right-to-left page progressions.
76107 </dl>
77108
78- <p class="issue">
79- recto/verso or even/odd or even-page/odd-page? If using odd/even, could use
80- "The page number used to determine whether a page is even or odd
81- is the physical page count starting from 1, and is sometimes different from
82- the page number printed on the page. In other words, if a page is on the
83- same side as the first page, it is an odd page." But which side would we
84- want if page-break-before changes the first page?
85-
86- Logical page selectors are added to support logical page selection.
109+ These values are further defined in [[!CSS3-BREAK]] .
110+
111+ Logical page selectors are also added to support logical page selection.
87112 Authors typically place page numbers using physical placements,
88113 but the contents of headers often follows conventions depending
89114 on which page in the spread is earlier.
@@ -106,61 +131,61 @@ Logical Page Classifications</h2>
106131 and ':right' page selectors.
107132
108133<h3 id="logical-dimension-properties">
109- Logical Height and Logical Width: the 'length ' and 'measure ' properties</h3>
134+ Logical Height and Logical Width: the 'block-size ' and 'inline-size ' properties</h3>
110135
111136 <pre class="propdef">
112- Name : measure, length
113- Value : length | percentage | auto
137+ Name : block-size, inline-size
138+ Value : <<'width'>>
114139 Initial : auto
115140 Applies to : same as 'width' and 'height'
116141 Inherited : no
117- Percentages : 'measure', 'length' of containing block
142+ Percentages : block-size/inline-size, respectively, of containing block
118143 Media : visual
119- Computed value : the percentage as specified or the absolute length or auto (see text)
144+ Computed value : same as 'width' and 'height'
120145 </pre>
121146
122- These properties correspond to the 'width' and 'height' properties. The
123- mapping depends on the element's 'writing-mode' .
147+ These properties correspond to the 'width' and 'height' properties.
148+ The mapping depends on the element's 'writing-mode' .
124149
125150 <pre class="propdef">
126- Name : min-measure , min-length
127- Value : length | percentage
151+ Name : min-block-size , min-inline-size
152+ Value : <<'min-width'>>
128153 Initial : 0
129154 Applies to : same as 'width' and 'height'
130155 Inherited : no
131- Percentages : 'measure', 'length' of containing block
156+ Percentages : block-size/inline-size, respectively, of containing block
132157 Media : visual
133- Computed value : the percentage as specified or the absolute length (see text)
158+ Computed value : same as 'min-width' and 'min-height'
134159 </pre>
135160
136- These properties correspond to the 'max -width' and 'max -height' properties.
161+ These properties correspond to the 'min -width' and 'min -height' properties.
137162 The mapping depends on the element's 'writing-mode' .
138163
139164 <pre class="propdef">
140- Name : max-measure , max-length
141- Value : length | percentage | none
165+ Name : max-block-size , max-inline-size
166+ Value : <<'max-width'>>
142167 Initial : none
143168 Applies to : same as 'width' and 'height'
144169 Inherited : no
145- Percentages : 'measure', 'length' of containing block
170+ Percentages : block-size/inline-size, respectively, of containing block
146171 Media : visual
147- Computed value : the percentage as specified or the absolute length or none (see text)
172+ Computed value : same as 'max-width' and 'max-height'
148173 </pre>
149174
150- These properties correspond to the 'min -width' and 'min -height' properties.
175+ These properties correspond to the 'max -width' and 'max -height' properties.
151176 The mapping depends on the element's 'writing-mode' .
152177
153178<h3 id="logical-prop">
154- Logical Margins and Offsets: : the margin- and offset- before/after/start/end
155- properties</h3>
179+ Logical Margins and Offsets:
180+ the margin- and offset- block-start/block-end/inline-start/inline-end properties</h3>
156181
157182 <pre class="propdef">
158- Name : margin-before , margin-after , margin-start, margin-end
159- Value : length | percentage | auto
183+ Name : margin-block-start , margin-block-end , margin-inline- start, margin-inline -end
184+ Value : <<'margin-left'>>
160185 Initial : 0
161186 Applies to : same as 'margin'
162187 Inherited : no
163- Percentages : logical-width of containing block
188+ Percentages : depends on layout model
164189 Media : visual
165190 Computed value : the percentage as specified or the absolute length or auto (see text)
166191 </pre>
@@ -171,8 +196,8 @@ Logical Height and Logical Width: the 'length' and 'measure' properties</h3>
171196 'direction' , and 'text-orientation' .
172197
173198 <pre class="propdef">
174- Name : offset-before , offset-after , offset-start, offset-end
175- Value : length | percentage | auto
199+ Name : offset-block-start , offset-block-end , offset-inline- start, offset-inline -end
200+ Value : <<'left'>>
176201 Initial : auto
177202 Applies to : positioned elements
178203 Inherited : no
@@ -186,12 +211,12 @@ Logical Height and Logical Width: the 'length' and 'measure' properties</h3>
186211 'writing-mode' , 'direction' , and 'text-orientation' .
187212
188213<h3 id="border-padding">
189- Logical Padding and Border: the padding- and border-<var>*</var>-
190- before/after/ start/end properties</h3>
214+ Logical Padding and Border: the padding- and border-<var>*</var>-
215+ block-start/block-end/inline- start/inline- end properties</h3>
191216
192217 <pre class="propdef">
193- Name : padding-before , padding-after , padding-start, padding-end
194- Value : length | percentage
218+ Name : padding-block-start , padding-block-end , padding-inline- start, padding-inline -end
219+ Value : <<'padding-left'>>
195220 Initial : 0
196221 Applies to : all elements
197222 Inherited : no
@@ -205,7 +230,7 @@ Logical Height and Logical Width: the 'length' and 'measure' properties</h3>
205230 element's 'writing-mode' , 'direction' , and 'text-orientation' .
206231
207232 <pre class="propdef">
208- Name : border-before- width, border-after- width, border-start-width, border-end-width
233+ Name : border-block-start- width, border-block-end- width, border-inline- start-width, border-inline -end-width
209234 Value : border-width
210235 Initial : medium
211236 Applies to : all elements
@@ -220,7 +245,7 @@ Logical Height and Logical Width: the 'length' and 'measure' properties</h3>
220245 on the element's 'writing-mode' , 'direction' , and 'text-orientation' .
221246
222247 <pre class="propdef">
223- Name : border-before- style, border-after- style, border-start-style, border-end-style
248+ Name : border-block-start- style, border-block-end- style, border-inline- start-style, border-inline -end-style
224249 Value : border-style
225250 Initial : none
226251 Applies to : all elements
@@ -235,7 +260,7 @@ Logical Height and Logical Width: the 'length' and 'measure' properties</h3>
235260 on the element's 'writing-mode' , 'direction' , and 'text-orientation' .
236261
237262 <pre class="propdef">
238- Name : border-before- color, border-after- color, border-start-color, border-end-color
263+ Name : border-block-start- color, border-block-end- color, border-inline- start-color, border-inline -end-color
239264 Value : color
240265 Initial : currentcolor
241266 Applies to : all elements
@@ -250,7 +275,7 @@ Logical Height and Logical Width: the 'length' and 'measure' properties</h3>
250275 on the element's 'writing-mode' , 'direction' , and 'text-orientation' .
251276
252277 <pre class="propdef">
253- Name : border-before , border-after , border-start, border-end
278+ Name : border-block-start , border-block-end , border-inline- start, border-inline -end
254279 Value : border-width || border-style || color
255280 Initial : (see individual properties)
256281 Applies to : all elements
@@ -265,7 +290,7 @@ Logical Height and Logical Width: the 'length' and 'measure' properties</h3>
265290 element's 'writing-mode' , 'direction' , and 'text-orientation' .
266291
267292<h3 id="logical-shorthand-keyword">
268- Shorthand Properties with ''logical'' Keyword</h3>
293+ Shorthand Properties with ''logical'' Keyword</h3>
269294
270295 The shorthand properties for margin, padding, and border set values
271296 for physical properties by default. But authors can specify the ''logical''
@@ -295,12 +320,12 @@ Logical Height and Logical Width: the 'length' and 'measure' properties</h3>
295320 assigned to the logical properties as follows:
296321 <ul>
297322 <li> If only one value is set, the value applies to all four logical sides.</li>
298- <li> If two values are set, the first is for before and after ,
299- the second is for start and end.</li>
300- <li> If three values are set, the first is for before ,
301- the second is for start and end,
302- and the third is for after .</li>
303- <li> If four values are set, they apply to the before, end, after , and start
323+ <li> If two values are set, the first is for block-start and block-end ,
324+ the second is for inline- start and inline- end.</li>
325+ <li> If three values are set, the first is for block-start ,
326+ the second is for inline- start and inline- end,
327+ and the third is for block-end .</li>
328+ <li> If four values are set, they apply to the block-start, inline- end, block-end , and inline- start
304329 sides in that order.</li>
305330 </ul>
306331
@@ -315,10 +340,10 @@ Logical Height and Logical Width: the 'length' and 'measure' properties</h3>
315340<!-- --> margin: logical 1em 2em 3em 4em;
316341<!-- -->}
317342<!-- -->blockquote {
318- <!-- --> margin-before: 1em;
319- <!-- --> margin-end: 2em;
320- <!-- --> margin-after: 3em;
321- <!-- --> margin-start: 4em;
343+ <!-- --> margin-block-start: 1em;
344+ <!-- --> margin-inline- end: 2em;
345+ <!-- --> margin-block-end: 3em;
346+ <!-- --> margin-inline- start: 4em;
322347<!-- -->}
323348<!----></code></pre>
324349 </div>
@@ -424,4 +449,4 @@ Logical Height and Logical Width: the 'length' and 'measure' properties</h3>
424449 <li> 'border-image-outset' </li>
425450 <li> 'border-image-repeat' </li>
426451 <li> 'border-image' </li>
427- </ul>
452+ </ul>
0 commit comments