CSS paint-order

The paint-order property controls the order used to paint an SVG element's fill, stroke and markers. It is most useful with SVG text and shapes.

Syntax

paint-order: normal;
paint-order: stroke fill;
paint-order: markers stroke fill;

Example

text {
  fill: white;
  stroke: #2563eb;
  stroke-width: 4px;
  paint-order: stroke fill;
}
Result:Blue Code

Common mistake

paint-order does not arrange CSS backgrounds. For background layers, use the order of values in background-image and related background properties.