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
Issue: This is just a place to keep ideas at the moment.
@@ -24,18 +25,10 @@ It has no status at W3C and has not yet been discussed by the CSSWG.
24
25
25
26
<ul>
26
27
<li>text-shadow with spread
27
-
<li>fill/stroke on text
28
28
<li>a text-decoration-offset property
29
29
<li>a text-line-width property
30
30
</ul>
31
31
32
-
fill/stroke {#fill-stroke}
33
-
-----------
34
-
35
-
* turn fill/stroke into shorthands, add fill-color/stroke-color. SVGWG says this is probably okay; only problem is if people style with real properties and put, for example, stroke-width before stroke. Who does that? Nobody, that's who.
36
-
* Need to know what element originates the coordinate space. Idea: add a fill-originator:yes/no property, which defines the element that give the coordinate space for the fill/stroke. SVG paint servers carry around their own originator information in *Units attributes, but maybe SVGWG can add a new value that makes them pay attention to the CSS originator. Most of the time you won't set this property; the shorthand will do it automatically for you.
37
-
* Need to expand on the box-decoration-break model. "box decorations" is a term covering all of them: need longhands for background-break, fill-break, border-break, stroke-break. (The current "slice" value isn't what SVG does.)
38
-
39
32
40
33
<!--
41
34
████████ ████ ██ ██
@@ -47,15 +40,17 @@ fill/stroke {#fill-stroke}
47
40
██ ████ ████████ ████████
48
41
-->
49
42
50
-
Text Fills {#text-fill}
51
-
=======================
43
+
Text Fills {#text-fills}
44
+
========================
52
45
53
46
A <dfn>text fill</dfn> paints within the glyph outlines of the box’s text.
54
47
Similar to backgrounds [[CSS3BG]], <a>text fills</a> can be a solid color ('fill-color') and/or an image pattern ('fill-image' etc.).
55
48
56
49
Advisement: It is strongly recommended to use the 'fill' shorthand when setting <a>text fills</a>.
57
50
The individual longhands should only be used when it's needed to alter one individual aspect.
58
51
52
+
Issue: Add a <css>box-break</css> property that is a shorthand for 'box-decoration-break', 'fill-break', and 'stroke-break'?
53
+
59
54
## Fill Color: the 'fill-color' property ## {#fill-color}
60
55
61
56
<pre class="propdef">
@@ -70,6 +65,23 @@ Text Fills {#text-fill}
70
65
Animatable: as color
71
66
</pre>
72
67
68
+
This property sets the fill color of an element.
69
+
This color is drawn behind any fill images.
70
+
71
+
Advisement: It's recommended that authors use the 'color' property to set the color of text,
72
+
rather than 'fill-color'.
73
+
74
+
Unlike 'background-color',
75
+
the fill color must only be drawn if the final layer of 'fill-image'
76
+
is <css>none</css> or an <a>invalid image</a>.
77
+
If it's a <a>valid image</a>,
78
+
the fill color must not be drawn.
79
+
80
+
Note: This is required to match the legacy behavior of SVG's 'fill' property,
81
+
which built in a "fallback color" to the single-layer image syntax.
82
+
In CSS this is better achieved with the ''image()'' function,
83
+
which makes fallback explicit.
84
+
73
85
## Fill Image Sources: the 'fill-image' property ## {#fill-image}
74
86
75
87
<pre class="propdef">
@@ -84,6 +96,10 @@ Text Fills {#text-fill}
84
96
Animatable: as repeatable list of images
85
97
</pre>
86
98
99
+
This property sets the fill images of an element.
100
+
Values are interpreted identically to 'background-image',
101
+
mutatis mutandi.
102
+
87
103
## Fill Positioning Area: the 'fill-origin' property ## {#fill-origin}
88
104
89
105
<pre class="propdef">
@@ -98,7 +114,8 @@ Text Fills {#text-fill}
98
114
Animatable: No
99
115
</pre>
100
116
101
-
This property specifies the coordinate system of the <a>text fill</a>.
117
+
This property specifies the coordinate system of the <a>text fill</a>,
118
+
setting the <dfn export>text fill positioning area</dfn>.
102
119
Values have the following meanings:
103
120
104
121
<dl dfn-for="fill-origin" dfn-type="value">
@@ -113,8 +130,8 @@ Text Fills {#text-fill}
113
130
<dd>
114
131
Use the box’s own content-box/padding-box/border-box as the <a>text fill positioning area</a>.
115
132
For <a>SVG shapes</a>,
116
-
''content-box'' and ''padding-box'' are treated as ''fill-box'',
117
-
while ''border-box'' is treated as ''stroke-box''.
133
+
''fill-origin/content-box'' and ''fill-origin/padding-box'' are treated as ''fill-origin/fill-box'',
134
+
while ''fill-origin/border-box'' is treated as ''fill-origin/stroke-box''.
118
135
119
136
<dt><dfn>fill-box</dfn>
120
137
<dd>
@@ -137,6 +154,14 @@ Text Fills {#text-fill}
137
154
}
138
155
</pre>
139
156
157
+
The <dfn export>text fill painting area</dfn> is identical to the <a>text fill positioning area</a>.
158
+
When painting,
159
+
the fill color/images are intersected with the glyph areas of the affected text,
160
+
or the fill geometry of the affected <a>SVG shape</a>.
161
+
162
+
Issue: SVG paint servers carry around their own originator information in *Units attributes,
163
+
but maybe SVGWG can add a new value that makes them pay attention to the CSS originator.
164
+
140
165
## Fragmented Fills: the 'fill-break' property ## {#fill-break}
141
166
142
167
<pre class="propdef">
@@ -169,6 +194,63 @@ Text Fills {#text-fill}
169
194
Animatable: as color
170
195
</pre>
171
196
197
+
## Tiling Fill Images: the 'fill-repeat' property ## {#fill-repeat}
198
+
199
+
<pre class='propdef'>
200
+
Name: fill-repeat
201
+
Value: <<repeat-style>>#
202
+
Initial: repeat
203
+
Applies to: inline boxes and <a>SVG shapes</a>
204
+
Inherited: yes
205
+
Percentages: n/a
206
+
Media: visual
207
+
Computed value: A list, each item consisting of: two keywords, one per dimension
208
+
Animatable: no
209
+
</pre>
210
+
211
+
Specifies how text fill images are tiled and they have been sized and positioned.
212
+
Values are interpreted identically to 'background-repeat',
213
+
mutatis mutandi.
214
+
215
+
## Positioning Fill Images: the 'fill-position' property ## {#fill-position}
216
+
217
+
<pre class='propdef'>
218
+
Name: fill-position
219
+
Value: <<position>>#
220
+
Initial: 0% 0%
221
+
Applies to: inline boxes and <a>SVG shapes</a>
222
+
Inherited: yes
223
+
Percentages: n/a
224
+
Media: visual
225
+
Computed value: A list, each item consisting of: a pair of offsets (horizontal and vertical) from the top left origin each given as a combination of an absolute length and a percentage
226
+
Animatable: as <a>repeatable list</a> of <a>simple list</a> of length, percentage, or calc
227
+
</pre>
228
+
229
+
If fill images have been specified,
230
+
this property specifies their initial position
231
+
(after any resizing)
232
+
within their corresponding <a>text fill positioning area</a>.
233
+
Values are interpreted identically to 'background-position',
234
+
mutatis mutandi.
235
+
236
+
## Sizing Fill Images: the 'fill-size' property ## {#fill-size}
237
+
238
+
<pre class='propdef'>
239
+
Name: fill-size
240
+
Value: <<bg-size>>#
241
+
Initial: auto
242
+
Applies to: inline boxes and <a>SVG shapes</a>
243
+
Inherited: yes
244
+
Percentages: n/a
245
+
Media: visual
246
+
Computed value: as specified, but with lengths made absolute and omitted ''background-size/auto'' keywords filled in
247
+
Animatable: as <a>repeatable list</a> of <a>simple list</a> of length, percentage, or calc
248
+
</pre>
249
+
250
+
Specifies the size of the fill images.
251
+
Values are interpreted identically to 'background-size',
252
+
mutatis mutandi.
253
+
172
254
## Fill Shorthand: the 'fill' property ## {#fill-shorthand}
173
255
174
256
<pre class="propdef">
@@ -187,15 +269,26 @@ Text Fills {#text-fill}
187
269
'fill-color',
188
270
'fill-image',
189
271
'fill-repeat',
190
-
'fill-attachment',
191
272
ETC
192
273
in one declaration.
193
274
Omitted values are set to their initial value,
194
275
except that an omitted 'fill-color' is set to ''transparent'',
195
-
and an omitted 'fill-attachment' is set to ''self''.
276
+
and an omitted 'fill-origin' is set to ''fill-origin/content-box''.
277
+
278
+
Issue: What should be the default value for fill-origin when set via this shorthand?
279
+
content-box or fill-box?
196
280
197
281
Issue: See 'stroke' for discussion of SVG's image/color fallback syntax.
198
282
283
+
## Layering Multiple Fill Images ## {#fill-layering}
284
+
285
+
The fill of a box can have multiple layers.
286
+
The number of layers is determined by the number of comma-separated values for the 'fill-image' property.
287
+
A value of ''fill-image/none'' still creates a layer.
288
+
289
+
List-valued properties interact exactly as for background images,
290
+
defined in [[css-backgrounds-3#layering]].
291
+
199
292
<!--
200
293
██████ ████████ ████████ ███████ ██ ██ ████████
201
294
██ ██ ██ ██ ██ ██ ██ ██ ██ ██
@@ -206,8 +299,8 @@ Text Fills {#text-fill}
206
299
██████ ██ ██ ██ ███████ ██ ██ ████████
207
300
-->
208
301
209
-
Text Stroking {#text-stroke}
210
-
============================
302
+
Text Outlines {#text-outlines}
303
+
==============================
211
304
212
305
A <dfn>text stroke</dfn> draws a border along the glyph outlines of the box’s text.
213
306
The resulting area can be filled similar to the <a>text fill</a> area.
@@ -216,6 +309,12 @@ Text Stroking {#text-stroke}
216
309
Advisement: It is strongly recommended to use the 'stroke' shorthand when setting <a>text strokes</a>.
217
310
The individual longhands should only be used when it's needed to alter one individual aspect.
218
311
312
+
By default, <a>text strokes</a> are drawn on top of <a>text fills</a>.
313
+
In SVG text or <a>SVG shapes</a>,
314
+
the drawing order is controlled by the 'paint-order' property.
315
+
316
+
Issue: Should 'paint-order' apply to non-SVG text too?
### Tiling Stroke Images: the 'stroke-repeat' property ### {#stroke-repeat}
574
+
575
+
<pre class='propdef'>
576
+
Name: stroke-repeat
577
+
Value: <<repeat-style>>#
578
+
Initial: repeat
579
+
Applies to: inline boxes and <a>SVG shapes</a>
580
+
Inherited: yes
581
+
Percentages: n/a
582
+
Media: visual
583
+
Computed value: A list, each item consisting of: two keywords, one per dimension
584
+
Animatable: no
585
+
</pre>
586
+
587
+
Specifies how stroke fill images are tiled and they have been sized and positioned.
588
+
Values are interpreted identically to 'background-repeat',
589
+
mutatis mutandi.
590
+
591
+
### Positioning Stroke Images: the 'stroke-position' property ### {#stroke-position}
592
+
593
+
<pre class='propdef'>
594
+
Name: stroke-position
595
+
Value: <<position>>#
596
+
Initial: 0% 0%
597
+
Applies to: inline boxes and <a>SVG shapes</a>
598
+
Inherited: yes
599
+
Percentages: n/a
600
+
Media: visual
601
+
Computed value: A list, each item consisting of: a pair of offsets (horizontal and vertical) from the top left origin each given as a combination of an absolute length and a percentage
602
+
Animatable: as <a>repeatable list</a> of <a>simple list</a> of length, percentage, or calc
603
+
</pre>
604
+
605
+
If stroke images have been specified,
606
+
this property specifies their initial position
607
+
(after any resizing)
608
+
within their corresponding <a>text stroke positioning area</a>.
609
+
Values are interpreted identically to 'background-position',
610
+
mutatis mutandi.
611
+
612
+
### Sizing Stroke Images: the 'stroke-size' property ### {#stroke-size}
613
+
614
+
<pre class='propdef'>
615
+
Name: stroke-size
616
+
Value: <<bg-size>>#
617
+
Initial: auto
618
+
Applies to: inline boxes and <a>SVG shapes</a>
619
+
Inherited: yes
620
+
Percentages: n/a
621
+
Media: visual
622
+
Computed value: as specified, but with lengths made absolute and omitted ''background-size/auto'' keywords filled in
623
+
Animatable: as <a>repeatable list</a> of <a>simple list</a> of length, percentage, or calc
624
+
</pre>
625
+
626
+
Specifies the size of the stroke images.
627
+
Values are interpreted identically to 'background-size',
628
+
mutatis mutandi.
629
+
468
630
### Stroke Shorthand: the 'stroke' property ### {#stroke-shorthand}
0 commit comments