fill
Summary
The ‘fill’ property paints the interior of the given graphical element. The area to be painted consists of any areas inside the outline of the shape. To determine the inside of the shape, all subpaths are considered, and the interior is determined according to the rules associated with the current value of the ‘fill-rule’ property. The zero-width geometric outline of a shape is included in the area to be painted.
Overview table
- Initial value
black
- Applies to
- shapes and text content elements
- Inherited
- Yes
- Media
- visual
- Animatable
- Yes
- Percentages
- n/a
Syntax
fill: <paint>
Values
- <paint>
- Properties ‘fill’ and ‘stroke’ take on a value of type <paint>
Usage
The fill operation fills open subpaths by performing the fill operation as if an additional "closepath" command were added to the path to connect the last point of the subpath with the first point of the subpath. Thus, fill operations apply to both open subpaths within ‘path’ elements (i.e., subpaths without a closepath command) and ‘polyline’ elements.
Related specifications
- SVG
- W3C Recommendation