You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[css-backgrounds-4] Add in a possible variant on background-position longhands (background-position-x/y). Still unsure how they will work out with logical keywords, so this is a very preliminary draft.
Abstract: This module contains the features of CSS relating to the borders and backgrounds of boxes on the page. It includes and extends the functionality of <a href="http://www.w3.org/TR/css3-background/">CSS Backgrounds and Borders Level 3</a>. [[CSS3BG]] The main extensions compared to level 3 are shaping ('corner-shape') and clipping borders ('border-clip'), logical background positions ('background-position'), and the ''extend'' ability of 'background-repeat'.
15
15
Ignored Terms:
16
+
Warning: Not Ready
16
17
</pre>
17
18
18
19
<h2 id="intro">
@@ -28,10 +29,10 @@ Introduction</h2>
28
29
Backgrounds</h2>
29
30
30
31
<h3 id="the-background-position">
31
-
Background Positioning: the 'background-position' property</h3>
32
+
Background Positioning: the 'background-position' shorthand property</h3>
32
33
33
34
<pre class='propdef'>
34
-
Name: backround-position
35
+
Name: background-position
35
36
Value: <<position>>#
36
37
Initial: top left
37
38
Applies to: all
@@ -42,18 +43,157 @@ Background Positioning: the 'background-position' property</h3>
If the value contains an ''inline-start'', ''inline-end'', ''block-start'', or ''block-end'' keyword,
61
+
then the shorthand sets
62
+
'background-position-inline' and 'background-position-block' to the specified values.
63
+
64
+
Otherwise
65
+
the shorthand sets
66
+
'background-position-x' and 'background-position-y' to the specified values.
67
+
68
+
Issue: Specify the value assignment in more detail.
69
+
70
+
Issue: Specify what happens to set of properties that are not set. Maybe they're just not set?
71
+
72
+
<table class=data>
73
+
<caption>Examples of 'background-position' values and their longhand assignments</caption>
74
+
<thead>
75
+
<tr>
76
+
<th>'background-position'
77
+
<th>x
78
+
<th>y
79
+
<th>inline
80
+
<th>block
81
+
<tbody>
82
+
<tr>
83
+
<td>''center''
84
+
<td>''center''
85
+
<td>''center''
86
+
<td>--
87
+
<td>--
88
+
<tr>
89
+
<td>''block-start''
90
+
<td>--
91
+
<td>--
92
+
<td>''center''
93
+
<td>''start''
94
+
<tr>
95
+
<td>''start''
96
+
<td>''start''
97
+
<td>''center''
98
+
<td>--
99
+
<td>--
100
+
<tbody>
101
+
<tr>
102
+
<td>''start end''
103
+
<td>''start''
104
+
<td>''end''
105
+
<td>--
106
+
<td>--
107
+
<tr>
108
+
<td>''block-start inline-end''
109
+
<td>--
110
+
<td>--
111
+
<td>''start'' = ''0%''
112
+
<td>''end'' = ''100%''
113
+
<tbody>
114
+
<tr>
115
+
<td>''center end 30px''
116
+
<td>''center'' = ''50%''
117
+
<td>''end 30px''
118
+
<td>--
119
+
<td>--
120
+
<tr>
121
+
<td>''block-start 30px center''
122
+
<td>--
123
+
<td>--
124
+
<td>''center''
125
+
<td>''start 30px'' = ''30px''
126
+
<tr>
127
+
<td>''start 30px end''
128
+
<td>''start 30px''
129
+
<td>''end''
130
+
<td>--
131
+
<td>--
132
+
</table>
133
+
134
+
Issue: Would it make more sense to use position-dependent unprefixed start/end keywords for the logical properties
135
+
(which would make them less awkward, and therefore more equal to physical positions),
136
+
and do something special for the axis-constrained horizontal-start/vertical-start values?
137
+
E.g. call them start-x/start-y or x-start/y-start?
138
+
139
+
<h4 id="background-position-longhands">
140
+
Background Positioning Longhands: the 'background-position-x', 'background-position-y', 'background-position-inline', and 'background-position-block' properties</h4>
141
+
142
+
Issue: This section is still being worked out. The tricky thing is making all the start/end keywords work sanely.
143
+
144
+
Issue: Initial values are incompatible.
145
+
146
+
<pre class='propdef'>
147
+
Name: background-position-x
148
+
Value: [ center | [ left | right | start | end ] [ <var><percentage></var> | <var><length></var> ]? ]#
149
+
Initial: left
150
+
Applies to: all
151
+
Inherited: no
152
+
Percentages: refer to width of background positioning area <em>minus</em> height of background image
153
+
Media: visual
154
+
Computed value: A list, each item consisting of: an offset given as a combination of an absolute length and a percentage, plus an origin keyword
155
+
</pre>
156
+
157
+
This property specifies the background position's horizontal component.
158
+
159
+
<pre class='propdef'>
160
+
Name: background-position-y
161
+
Value: [ center | [ top | bottom | start | end ] [ <var><percentage></var> | <var><length></var> ]? ]#
162
+
Initial: left
163
+
Applies to: all
164
+
Inherited: no
165
+
Percentages: refer to height of background positioning area <em>minus</em> height of background image
166
+
Media: visual
167
+
Computed value: A list, each item consisting of: an offset given as a combination of an absolute length and a percentage, plus an origin keyword
168
+
</pre>
169
+
170
+
This property specifies the background position's vertical component.
171
+
172
+
<pre class='propdef'>
173
+
Name: background-position-inline
174
+
Value: [ center | [ start | end ] [ <var><percentage></var> | <var><length></var> ]? ]#
175
+
Initial: start
176
+
Applies to: all
177
+
Inherited: no
178
+
Percentages: refer to inline-size of background positioning area <em>minus</em> inline-size of background image
179
+
Media: visual
180
+
Computed value: A list, each item consisting of: an offset given as a combination of an absolute length and a percentage, plus an origin keyword
181
+
</pre>
182
+
183
+
This property specifies the background position's inline-axis component.
184
+
185
+
<pre class='propdef'>
186
+
Name: background-position-block
187
+
Value: [ center | [ start | end ] [ <var><percentage></var> | <var><length></var> ]? ]#
188
+
Initial: start
189
+
Applies to: all
190
+
Inherited: no
191
+
Percentages: refer to size of background positioning area <em>minus</em> size of background image
192
+
Media: visual
193
+
Computed value: A list, each item consisting of: an offset given as a combination of an absolute length and a percentage, plus an origin keyword
194
+
</pre>
55
195
56
-
<p class="issue">Add logical keywords
196
+
This property specifies the background position's block-axis component.
57
197
58
198
<h2 id="corners">
59
199
Corners</h2>
@@ -176,7 +316,7 @@ Partial borders</h2>
176
316
if you have dotted borders, you want whole dots always, not parts of dots.
177
317
So it should be a drawing limit, not a clip.
178
318
179
-
<h3 id="partial-borders">
319
+
<h3 id="border-limit">
180
320
Partial Borders: the 'border-limit' property</h3>
181
321
182
322
<table class=propdef>
@@ -278,7 +418,7 @@ The 'border-clip' properties</h3>
278
418
<td>visual
279
419
<tr>
280
420
<th>Computed value:
281
-
<td>''normal'', or a list consisting of absolute lengths, or percentages as specified
421
+
<td>''border-clip/normal'', or a list consisting of absolute lengths, or percentages as specified
282
422
</table>
283
423
284
424
<p class=issue>Should these properties be simplified to only accept <code>normal | [ <length> | <percentage> ] +</code>?
@@ -288,7 +428,8 @@ The 'border-clip' properties</h3>
288
428
the third part is visible, etc. Parts can be specified with lengths,
289
429
percentages, or fractions (expressed by the ''fr'' unit, as per
290
430
[[CSS3GRID]] or its <a href="http://dev.w3.org/csswg/css3-grid/">editor's
291
-
edition</a>). The ''normal'' value means
431
+
edition</a>).
432
+
The ''border-clip/normal'' value means
292
433
that the border is not split, but shown normally.
293
434
294
435
<p>'border-clip' is a shorthand property for the four individual properties.
@@ -556,7 +697,7 @@ Additions Since Level 3</h3>
556
697
<li>multiple borders per element
557
698
<li>logical border properties
558
699
<li><a href="#partial-borders">Partial Borders</a> (make part of border shorthand as well!)
559
-
<li><a href="http://lists.w3.org/Archives/Public/www-style/2012Oct/0314.html">More 'border-radius' shorthands</a> for doing both corners on a side at once.
700
+
<li><a href="http://lists.w3.org/Archives/Public/www-style/2012Oct/0314.html">More <css>border-radius</css> shorthands</a> for doing both corners on a side at once.
560
701
<li>Splitting horizontal / vertical spread radius for box-shadow, if we can come up with a sane syntax for it.
0 commit comments