On this page
color
Prev: `text-wrap` | Up: typography | Next: `color-scheme`
Rel: typography, Typography & Color Guide
Ref: MDN Web Docs — color
Tags: #public #web #css #properties #typography #tier/core
Syntax & Overview
color: var(--fg);
Sets foreground text color and the value of currentColor.
- Initial:
CanvasText| Inherited: Yes | Animatable: Yes
Notes & Best Practices
- Inherited by descendants and also sets
currentColor(handy for matching SVG icon fills and borders automatically).
Example
.link { color: oklch(52% 0.19 255); }
.link svg { fill: currentColor; }
Linked from
Related notes
- tuts/css/properties/typography/color-scheme Linked here; links to this page; shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography/text-wrap Linked here; links to this page; shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography Linked here; links to this page; shared tags: #css, #properties, #typography, #web
- tuts/css/properties/typography_and_color Linked here; shared tags: #css, #properties, #typography, #web
- tuts/css/properties/typography/accent-color shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography/font-family shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography/font-size shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/typography/line-height shared tags: #css, #properties, #tier, #typography, #web
- tuts/css/properties/box_model/aspect-ratio shared tags: #css, #properties, #tier, #web
- tuts/css/properties/box_model/box-sizing shared tags: #css, #properties, #tier, #web