CSS paint-order Property
Example
text {
font-family: sans-serif;
font-size: 50px;
font-weight: bold;
fill: black;
stroke: red;
stroke-width: 4px;
}
.stroke-behind {
paint-order: stroke fill;
}
Meaning:
The paint-order CSS property control the order in which the fill and stroke (and painting markers) of text content and shapes are drawn.
If no value is specified, the default paint order is fill, stroke, markers.
Note: In the case of this property, markers are only appropriate when drawing SVG shapes involving the use of the marker-* properties (e.g. marker-start) and <marker> element.
Default value: | normal |
Inherited: | Yes |
Animatable: | No |
Version: | CSS3 |
JavaScript syntax: |
|
Standard Syntax
paint-order: normal|stroke, fill, markers|initial|inherit|revert|revert-layer|unset;
Browser Support
Status
Property Values
The following table describes the values of this property:
Value | Description |
---|---|
normal | Paint the different items in normal paint order. |
stroke, fill, markers | Specify some or all of these values in the order you want them to be painted in. |
initial | Sets this property to its default value. |
inherit | If specified, the associated element takes the computed value of its parent element animation-delay property. |
revert | Reverts the cascaded value of the property from its current value to the value the property |
revert-layer | Rollback styles to the ones specified in previous cascade layers. |
unset | Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not. |
Default CSS Property Values
selectors {
paint-order: normal;
}