{"id":350656,"date":"2021-09-01T10:54:41","date_gmt":"2021-09-01T17:54:41","guid":{"rendered":"https:\/\/css-tricks.com\/?page_id=350656"},"modified":"2022-07-11T09:29:27","modified_gmt":"2022-07-11T16:29:27","slug":"outline-color","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/o\/outline-color\/","title":{"rendered":"outline-color"},"content":{"rendered":"\n

The outline-color<\/code> CSS property specifies the color of an element’s outline. What\u2019s an outline? An outline<\/dfn> is a line that is drawn around elements \u2014 outside the border edge \u2014 that is used for accessibility or decoration purposes when that element is in focus.<\/p>\n\n\n\n

button {\n  outline-color: #e435;\n}<\/code><\/pre>\n\n\n\n

outline-color<\/code> is a constituent property in the outline<\/code><\/a> shorthand and is defined in the CSS Basic User Interface Module Level 4<\/a> specification which is currently in Editor\u2019s Draft status.<\/p>\n\n\n\n\n\n\n

Usage<\/h3>\n\n\n

We usually set the outline of an element using the shorthand property:<\/p>\n\n\n\n

a:focus {\n  outline: 0.1em solid darkgray;\n}<\/code><\/pre>\n\n\n

Syntax<\/h3>\n\n\n
outline-color: <color>| invert<\/code><\/pre>\n\n\n\n