{"id":198607,"date":"2015-04-03T09:31:53","date_gmt":"2015-04-03T16:31:53","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=198607"},"modified":"2021-08-02T11:01:58","modified_gmt":"2021-08-02T18:01:58","slug":"text-decoration-color","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/t\/text-decoration-color\/","title":{"rendered":"text-decoration-color"},"content":{"rendered":"\n

The text-decoration-color<\/code> property sets the color of the underline, overline, or line-through on text with the text-decoration<\/a><\/code> property applied. It can also set the underline color on links.<\/p>\n\n\n\n

a {\n  text-decoration-color: #E18728;\n}<\/code><\/pre>\n\n\n

Values<\/h3>\n\n\n

text-decoration-color<\/code> can inherit<\/code> or accept any CSS color value<\/a>, including named colors, HEX colors, RGBa, and HSLa.<\/p>\n\n\n

Shorthand<\/h3>\n\n\n

In browsers that support text-decoration-style<\/code> and text-decoration-color<\/code> you can add a color to a text-decoration<\/code> shorthand property:<\/p>\n\n\n\n

.underlined {\n  text-decoration: underline dotted red;\n}<\/code><\/pre>\n\n\n\n

Currently only Firefox supports this unprefixed. Safari supports it with the -webkit<\/code> prefix. Chrome also needs the -webkit<\/code> prefix and experimental web platform features enabled in Chrome flags.<\/p>\n\n\n

Demo<\/h3>\n\n\n

The text-decoration-color<\/code> in this demo works in the current versions of Firefox and Safari. It will also work in Chrome with the “experimental Web Platform features” flag enabled.<\/p>\n\n\n\n