The text-decoration-skip
CSS property specifies what parts of the element’s content any text decoration affecting the element must skip over. It controls all text decoration lines drawn by the element and also any text decoration lines drawn by its ancestors.
/* Single keyword */ text-decoration-skip: none; text-decoration-skip: objects; text-decoration-skip: edges; text-decoration-skip: box-decoration; text-decoration-skip: spaces; /* Multiple keywords */ text-decoration-skip: objects spaces; text-decoration-skip: leading-spaces trailing-spaces; text-decoration-skip: objects edges box-decoration; /* Global keywords */ text-decoration-skip: inherit; text-decoration-skip: initial; text-decoration-skip: unset;
Note: The ink
value was moved to the text-decoration-skip-ink
property.
Initial value | objects |
---|---|
Applies to | all elements |
Inherited | yes |
Media | visual |
Computed value | as specified |
Animation type | discrete |
Canonical order | order of appearance in the formal grammar of the values |
none
objects
spaces
letter-spacing
or word-spacing
.leading-spaces
spaces
, except that only leading spaces are skipped.trailing-spaces
spaces
, except that only trailing spaces are skipped.edges
box-decoration
none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]
<p><em>Hey,</em> <em>grab a cup of coffee!</em></p>
p { margin: 0; font-size: 3em; text-decoration: underline; text-decoration-skip: edges; }
Specification | Status | Comment |
---|---|---|
CSS Text Decoration Module Level 4 The definition of 'text-decoration-skip' in that specification. | Editor's Draft | Initial definition |
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 57 | No | No | No | 44 | 8 -webkit- 1 |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | Opera Android | iOS Safari | Samsung Internet |
---|---|---|---|---|---|---|---|
Basic support | 57 | 57 | No | No | 44 | 8 -webkit- 1 | ? |
1. Only supports the none
and skip
values; all other values behave like those two values.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration-skip