paint-order
The paint-order CSS property sets the z-order of strokes, fills, and (in SVG content) markers. For example, paint-order: markers stroke fill; draws the markers, then stroke on top of markers, then fill on top of both markers and stroke.
Overview
The paint-order CSS property sets the z-order of strokes, fills, and (in SVG content) markers. For example, paint-order: markers stroke fill; draws the markers, then stroke on top of markers, then fill on top of both markers and stroke.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 123 | 123 | 60 | 11 | 123 | 11 | |
| Other | ||||||
| The paint-order attribute specifies the order that the fill, stroke, and markers of a given shape or text element are painted. | ≤73 | 79 | ≤66 | ≤12 | ≤73 | ≤12 |
- This browser only partially implements this feature
- This feature was removed in a later browser version (123)
- Does not affect stroked HTML text, see bug 41372165
- This browser only partially implements this feature
- This feature was removed in a later browser version (123)
- Does not affect stroked HTML text, see bug 41372165
- This browser only partially implements this feature
- This feature was removed in a later browser version (11)
- Does not affect stroked HTML text, see bug 168601
- This browser only partially implements this feature
- This feature was removed in a later browser version (123)
- Does not affect stroked HTML text, see bug 41372165
- This browser only partially implements this feature
- This feature was removed in a later browser version (11)
- Does not affect stroked HTML text, see bug 168601
Syntax
.outlined-text {
-webkit-text-stroke: 3px black;
paint-order: stroke fill;
color: white;
} Live demo
Use cases
Maintainable CSS architecture
Use paint-order to make stylesheet intent clearer in larger codebases and shared design systems.
Fallback management
Control resets, imports, inheritance, or feature branches with explicit CSS rules instead of ad hoc duplication.
Cautions
- Cascade-level tools are powerful, so misuse can make style ownership harder to understand.
- Keep rules scoped and documented when they affect many selectors or entire stylesheets.
Accessibility
- Global CSS controls should not accidentally remove focus, contrast, or structural cues.
- Fallback paths should remain readable and functional, especially for assistive-technology users.
Related links
Powered by web-features