CSS text-decoration-skip Property

The CSS text-decoration-skip property controls which portions of text or inline content are skipped when text decoration lines are drawn.

Historically, this property allowed underlines, overlines, and other decorations to be interrupted around spaces, inline objects, element edges, and box decorations.

Important: The legacy text-decoration-skip property is deprecated and has limited browser support. The CSS Text Decoration Module Level 4 specification has redesigned it as a shorthand for more specific skipping properties. For controlling whether underlines cross letter shapes, use the widely supported text-decoration-skip-ink property instead.

text-decoration-skip Syntax

The legacy syntax accepts individual keywords or combinations of keywords describing which portions of a decoration should be skipped.

Legacy Syntax

.example {
  text-decoration-skip: none;
}
.example {
  text-decoration-skip: objects;
}
.example {
  text-decoration-skip: spaces;
}
.example {
  text-decoration-skip: leading-spaces;
}
.example {
  text-decoration-skip: trailing-spaces;
}
.example {
  text-decoration-skip: edges;
}
.example {
  text-decoration-skip: box-decoration;
}

These values describe the historical property behavior. They are not consistently implemented in current browsers.

Multiple Legacy Values

.example {
  text-decoration-skip: objects spaces;
}
.example {
  text-decoration-skip: leading-spaces trailing-spaces;
}
.example {
  text-decoration-skip: objects edges box-decoration;
}

Legacy syntax allowed multiple skipping behaviors to be combined in one declaration.

Current Draft Syntax

.example {
  text-decoration-skip: none;
}
.example {
  text-decoration-skip: auto;
}

The CSS Text Decoration Module Level 4 draft defines text-decoration-skip as a shorthand using none and auto. This draft syntax is not a reliable cross-browser replacement for the historical keywords.

CSS-Wide Keywords

.example {
  text-decoration-skip: initial;
}
.example {
  text-decoration-skip: inherit;
}
.example {
  text-decoration-skip: unset;
}
.example {
  text-decoration-skip: revert;
}
.example {
  text-decoration-skip: revert-layer;
}

CSS-wide keywords follow the normal cascade rules when the browser recognizes the property.

Property Values

The following table describes the historical values associated with text-decoration-skip.

Value Description
none Does not intentionally skip portions of the decoration.
objects Skips the margin box of atomic inline-level elements, such as inline images and inline blocks.
spaces Skips whitespace and associated spacing between text characters.
leading-spaces Skips leading whitespace in the relevant text segment.
trailing-spaces Skips trailing whitespace in the relevant text segment.
edges Insets decoration endpoints slightly from the edges of the decorated content.
box-decoration Skips portions associated with an inline box's margin, border, and padding when the decoration originates from an ancestor.
Multiple keywords Combines different legacy skipping behaviors.

Historical Property Characteristics

Characteristic Value
Historical initial value objects
Inherited Yes
Applies to All elements
Historical computed value As specified
Animation type Discrete
Percentages Not applicable
Status Deprecated legacy property
Modern specification CSS Text Decoration Module Level 4

Note: The current Level 4 draft defines different shorthand behavior. The historical initial value and computed-value information above should not be interpreted as the current draft shorthand definition.

How It Works

Text decorations are drawn along text runs. Skipping determines whether selected portions of those lines are interrupted rather than painted continuously.

Step 1: Create an Underline

.example {
  text-decoration-line: underline;
}

The browser draws an underline using its normal text decoration behavior.

Step 2: Request Skipping

.example {
  text-decoration-line: underline;
  text-decoration-skip: spaces;
}

In an implementation supporting the legacy spaces value, the underline would be interrupted across whitespace.

Step 3: Combine Skipping Behaviors

.example {
  text-decoration-line: underline;
  text-decoration-skip: objects spaces;
}

The historical syntax requests interruptions around atomic inline objects and spaces.

Step 4: Use a Modern Alternative

.example {
  text-decoration-line: underline;
  text-decoration-skip-ink: auto;
}

This widely supported property allows the browser to interrupt underlines where they would intersect letter shapes.

Important Consideration

These examples illustrate two different types of skipping. The legacy property addressed spaces, objects, and box boundaries, while text-decoration-skip-ink addresses intersections with glyph shapes. They are not interchangeable in every situation.

The none Value

In the legacy syntax, none requests that no portions of the text decoration be skipped by this property.

Legacy Example

.example {
  text-decoration-line: underline;
  text-decoration-skip: none;
}

Historically, this requested a continuous decoration across the content, including areas that might otherwise be skipped.

Modern Ink-Skipping Alternative

.example {
  text-decoration-line: underline;
  text-decoration-skip-ink: none;
}

This modern declaration prevents ink skipping, allowing an underline to cross glyph descenders.

Important Difference

The modern declaration controls intersections with glyph ink. It does not reproduce every behavior associated with the historical text-decoration-skip: none value.

The objects Value

The legacy objects keyword requests that decoration lines skip atomic inline-level elements, including their margin boxes.

Legacy Example

.example {
  text-decoration-line: underline;
  text-decoration-skip: objects;
}

Inline Image Example

<p class="object-example">
  Download <img src="download-icon.png" alt="" width="20" height="20"> File
</p>
.object-example {
  text-decoration-line: underline;
  text-decoration-skip: objects;
}
.object-example img {
  vertical-align: middle;
}

In a supporting historical implementation, the underline would be interrupted around the inline image.

Inline-Block Example

.object-example {
  text-decoration-line: underline;
  text-decoration-skip: objects;
}
.object-example .inline-badge {
  display: inline-block;
  padding: 2px 6px;
  background: #e2e8f0;
}

The legacy value was intended to prevent ancestor decoration lines from crossing the inline-block's margin box.

Important Consideration

Atomic inline elements already have special behavior in text decoration propagation. Do not rely on the deprecated objects value to control their appearance in modern browsers.

The spaces Value

The legacy spaces keyword requests that decoration lines be interrupted across whitespace and associated letter or word spacing.

Legacy Example

.example {
  text-decoration-line: underline;
  text-decoration-skip: spaces;
}

Multiple Words

<p class="space-example">HTML CSS JavaScript</p>
.space-example {
  text-decoration-line: underline;
  text-decoration-skip: spaces;
}

In a supporting legacy implementation, the underline would be interrupted at the spaces separating the words.

Letter and Word Spacing

.space-example {
  text-decoration-line: underline;
  text-decoration-skip: spaces;
  word-spacing: 8px;
}

The historical value also addressed spacing associated with skipped whitespace.

Modern Alternative

The current CSS Text Decoration Module Level 4 draft defines a separate text-decoration-skip-spaces property for this behavior. Its browser support is not yet suitable for general production use.

Leading and Trailing Spaces

The historical leading-spaces and trailing-spaces keywords provide more specific control over whitespace skipping.

Leading Spaces

.example {
  text-decoration-line: underline;
  text-decoration-skip: leading-spaces;
}

This legacy value requests skipping at the beginning of relevant text segments.

Trailing Spaces

.example {
  text-decoration-line: underline;
  text-decoration-skip: trailing-spaces;
}

This legacy value requests skipping at the end of relevant text segments.

Combining Both Values

.example {
  text-decoration-line: underline;
  text-decoration-skip: leading-spaces trailing-spaces;
}

Both ends of the relevant text segments are included in the skipping behavior.

Important Consideration

Normal HTML whitespace collapsing can remove or combine spaces before decoration painting occurs. The visible effect depends on text formatting as well as browser support.

The edges Value

The legacy edges keyword requests that decoration lines begin and end slightly inside the decorated content's edges.

Legacy Example

.example {
  text-decoration-line: underline;
  text-decoration-skip: edges;
}

Adjacent Inline Elements

<p><span class="edge-example">HTML</span><span class="edge-example">CSS</span></p>
.edge-example {
  text-decoration-line: underline;
  text-decoration-skip: edges;
}

In a supporting implementation, the underline endpoints would be inset slightly so adjacent decorated elements have visibly separate lines.

Why Edge Skipping Matters

Separate underline segments can be important in typography where the boundaries between decorated characters or words carry meaning.

Modern Specification

The CSS Text Decoration Module Level 4 work separates edge-related behavior from other skipping controls. Do not assume the historical edges keyword is supported in current browsers.

The box-decoration Value

The historical box-decoration keyword requests that decorations originating from an ancestor skip an inline box's margin, border, and padding areas.

Legacy Example

.example {
  text-decoration-skip: box-decoration;
}

Decorated Parent and Child

<p class="box-parent">
  Text with a <span class="box-child">styled segment</span> inside.
</p>
.box-parent {
  text-decoration-line: underline;
}
.box-child {
  padding: 4px;
  border: 1px solid #2563eb;
  text-decoration-skip: box-decoration;
}

The legacy value was intended to interrupt the ancestor's decoration where it crossed the child's box decoration areas.

Important Consideration

This behavior concerns decorations introduced by ancestors. It does not mean an element's own underline is automatically removed from its content.

Modern Specification

The Level 4 draft separates box-related skipping into more specific properties, including text-decoration-skip-box. These draft features should not be treated as broadly supported production CSS.

Combining Multiple Values

The historical syntax allowed different skipping behaviors to be combined using space-separated keywords.

Objects and Spaces

.example {
  text-decoration-skip: objects spaces;
}

Requests skipping around atomic inline objects and whitespace.

Edges and Spaces

.example {
  text-decoration-skip: edges spaces;
}

Requests inset decoration endpoints and interruptions across whitespace.

Objects, Edges, and Box Decorations

.example {
  text-decoration-skip: objects edges box-decoration;
}

Combines three historical skipping behaviors.

Invalid Legacy Combination

.example {
  text-decoration-skip: none spaces;
}

The historical none keyword was intended to disable skipping and was not combined with other skipping keywords.

Important Consideration

These combinations document the legacy syntax. They are not a recommended technique for modern browser-compatible stylesheets.

Modern Specification

The CSS Text Decoration Module Level 4 draft redesigns text-decoration-skip as a shorthand for separate properties controlling different types of decoration interruptions.

Current Draft Shorthand

.example {
  text-decoration-skip: auto;
}
.example {
  text-decoration-skip: none;
}

These values belong to the newer draft design and should not be confused with the full set of historical keywords.

Related Draft Properties

Property Purpose
text-decoration-skip-ink Controls interruptions where underlines and overlines intersect glyph ink.
text-decoration-skip-spaces Controls skipping across whitespace and related spacing.
text-decoration-skip-box Controls skipping around box decoration areas.
text-decoration-skip-self Controls whether decorations originating from ancestors affect an element.

Browser Support Differences

These properties do not share the same browser support. The established text-decoration-skip-ink property is widely available, while other skipping controls remain experimental or unsupported.

Recommended Approach

Use text-decoration-skip-ink for glyph intersections. For other decoration-skipping behavior, test the intended browsers and provide a design that remains readable when unsupported declarations are ignored.

The text-decoration-skip-ink Alternative

The text-decoration-skip-ink property controls whether underlines and overlines are interrupted where they would cross letter shapes.

It is the preferred modern property when the goal is to keep underlines from touching descenders such as those in the letters g, j, p, q, and y.

Automatic Ink Skipping

.example {
  text-decoration-line: underline;
  text-decoration-skip-ink: auto;
}

The browser can interrupt the underline where it would otherwise touch glyph ink.

Continuous Underline

.example {
  text-decoration-line: underline;
  text-decoration-skip-ink: none;
}

The underline is not interrupted to avoid glyph intersections.

Skipping All Glyph Intersections

.example {
  text-decoration-line: underline;
  text-decoration-skip-ink: all;
}

The all value requests skipping around every glyph intersection, including scripts for which auto might not skip. Support for this value varies by browser version.

Comparison

Property Behavior
text-decoration-skip Deprecated legacy control for several types of decoration interruptions.
text-decoration-skip-ink Modern control for interruptions around glyph ink.

Important Consideration

The modern property controls underlines and overlines, not strikethroughs. It also does not reproduce all of the legacy property's whitespace, object, or edge-skipping behavior.

Practical Examples

The first examples demonstrate historical syntax. The later examples use the recommended modern property.

Legacy Whitespace Skipping

.legacy-spaces {
  text-decoration-line: underline;
  text-decoration-skip: spaces;
}

Historically requested underline interruptions across spaces.

Legacy Object Skipping

.legacy-objects {
  text-decoration-line: underline;
  text-decoration-skip: objects;
}

Historically requested interruptions around atomic inline objects.

Legacy Edge Skipping

.legacy-edges {
  text-decoration-line: underline;
  text-decoration-skip: edges;
}

Historically requested small gaps at the endpoints of decorated text.

Modern Readable Underline

.readable-underline {
  text-decoration-line: underline;
  text-decoration-skip-ink: auto;
}

Allows the browser to interrupt underlines around descenders.

Modern Continuous Underline

.continuous-underline {
  text-decoration-line: underline;
  text-decoration-skip-ink: none;
}

Prevents glyph-based underline interruptions.

Custom Link Underline

.custom-link {
  color: #1d4ed8;
  text-decoration-line: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-skip-ink: auto;
}

Combines a visible underline with automatic ink skipping.

Decorative Heading

.decorative-heading {
  text-decoration-line: underline;
  text-decoration-color: #2563eb;
  text-decoration-thickness: 4px;
  text-decoration-skip-ink: none;
}

Creates a continuous decorative underline.

Wavy Underline

.wavy-text {
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-color: #dc2626;
  text-decoration-skip-ink: auto;
}

Uses a wavy underline with automatic glyph skipping where applicable.

Browser-Safe Fallback

.fallback-link {
  text-decoration: underline;
  text-decoration-skip-ink: auto;
}

The underline remains visible even if the browser ignores the ink-skipping declaration.

text-decoration-skip Example

Because the legacy property is not consistently supported, this live example demonstrates the practical difference between modern automatic ink skipping and a continuous underline.

The legacy syntax is included separately for reference, but the browser result uses text-decoration-skip-ink so the comparison works in modern browsers.

Legacy CSS Example

.legacy-example {
  text-decoration-line: underline;
  text-decoration-skip: spaces;
}

This historical declaration is not used in the live demonstration because its behavior cannot be relied upon across current browsers.

HTML Example

<div class="decoration-skip-demo">
  <div class="skip-sample">
    <strong>Automatic Ink Skipping</strong>
    <p class="skip-auto">Typography and Web Design</p>
  </div>
  <div class="skip-sample">
    <strong>Continuous Underline</strong>
    <p class="skip-none">Typography and Web Design</p>
  </div>
</div>

CSS Example

.decoration-skip-demo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.decoration-skip-demo .skip-sample {
  padding: 16px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}
.decoration-skip-demo strong {
  display: block;
  margin-bottom: 16px;
  color: #334155;
  font-size: 14px;
}
.decoration-skip-demo p {
  margin: 0;
  color: #1f2937;
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1.6;
  text-decoration-line: underline;
  text-decoration-color: #2563eb;
  text-decoration-thickness: 3px;
}
.decoration-skip-demo .skip-auto {
  text-decoration-skip-ink: auto;
}
.decoration-skip-demo .skip-none {
  text-decoration-skip-ink: none;
}
Browser Result
Automatic Ink Skipping

Typography and Web Design

Continuous Underline

Typography and Web Design

Comparing the Results

Setting Expected Behavior
text-decoration-skip-ink: auto The browser may interrupt the underline around glyph descenders.
text-decoration-skip-ink: none The underline remains continuous through glyph intersections.

The difference is easiest to observe around descenders in letters such as g, p, and y. The exact appearance depends on the font and browser.

Changing the Underline Thickness

.decoration-skip-demo p {
  text-decoration-thickness: 5px;
}

A thicker underline can make differences in ink skipping easier to see.

Changing the Underline Offset

.decoration-skip-demo p {
  text-underline-offset: 5px;
}

Moving the underline farther from the text may reduce glyph intersections and make the two examples appear more similar.

Accessibility Considerations

Decoration skipping can affect text readability and the visibility of important interface indicators.

Keep Underlines Readable

Allowing underlines to skip glyph descenders can help prevent lines from visually interfering with letter shapes.

Maintain Recognizable Links

Links should remain identifiable even when decoration lines contain small interruptions.

Avoid Excessive Decoration Effects

Complex or unusually thick decorations can reduce readability, especially at smaller font sizes.

Use Appropriate Contrast

Decoration lines should remain distinguishable from the background.

Test Different Fonts

Fonts have different descenders, underline positions, and metrics. Test typography with the actual fonts used on the website.

Support Text Resizing

Verify that decorations remain readable when users increase font size or browser zoom.

Avoid Unsupported Features for Essential Information

Do not rely on the deprecated property's skipping behavior to communicate meaning or distinguish interactive elements.

Use Semantic HTML

Text decorations are visual effects. Use appropriate HTML elements when content represents links, deleted text, or other meaningful structures.

Common Mistakes

Assuming the Property Is Widely Supported

.example {
  text-decoration-skip: spaces;
}

The historical spaces value is not consistently supported in modern browsers.

Confusing the Legacy and Modern Syntax

The current Level 4 draft uses a different shorthand design. Historical keywords should not be treated as interchangeable with the newer none and auto shorthand values.

Confusing text-decoration-skip With text-decoration-skip-ink

The modern ink-skipping property addresses glyph intersections. It does not reproduce every historical skipping behavior.

Expecting the Property to Create an Underline

.example {
  text-decoration-skip: spaces;
}

The property controls skipping behavior, not whether a decoration line exists.

Using a Decoration-Line Keyword

.example {
  text-decoration-skip: underline;
}

Use text-decoration-line to specify an underline.

Using a Color Value

.example {
  text-decoration-skip: red;
}

Use text-decoration-color to control decoration color.

Using a Thickness Value

.example {
  text-decoration-skip: 3px;
}

Use text-decoration-thickness to control decoration thickness.

Assuming Skipping Changes Layout

Decoration skipping affects line painting and does not normally change the dimensions of the element.

Ignoring Inheritance

The historical property was inherited, unlike several other text decoration properties. The modern text-decoration-skip-ink property is also inherited.

Expecting Identical Results Across Browsers

Different browsers and fonts can produce different decoration appearances, even when using supported properties.

Using Deprecated Syntax in New Projects

Prefer supported modern properties and test browser compatibility before relying on experimental decoration-skipping features.

Important Considerations

Keep the following points in mind when using text-decoration-skip:

  • The historical property controls interruptions in text decoration lines.
  • The legacy property is deprecated.
  • Browser support for historical values is limited and inconsistent.
  • The historical syntax included none, objects, spaces, leading-spaces, trailing-spaces, edges, and box-decoration.
  • Historical syntax allowed multiple skipping keywords in one declaration.
  • The historical initial value was objects.
  • The historical property was inherited.
  • The property does not create decoration lines.
  • The property does not control decoration color.
  • The property does not control decoration thickness.
  • Skipping affects how decoration lines are painted.
  • Skipping does not normally change element layout dimensions.
  • The Level 4 draft redesigns the property as a shorthand.
  • The draft shorthand accepts none and auto.
  • The draft separates different skipping behaviors into individual properties.
  • text-decoration-skip-ink is widely supported in modern browsers.
  • text-decoration-skip-ink controls glyph intersections rather than all legacy skipping behaviors.
  • The initial value of text-decoration-skip-ink is auto.
  • The none ink-skipping value allows decoration lines to cross glyph shapes.
  • The all ink-skipping value requests skipping around all glyph intersections.
  • Support for individual modern skipping properties varies.
  • Font metrics affect decoration positioning and visibility.
  • Underline thickness and offset can affect how noticeable ink skipping becomes.
  • Links should remain recognizable regardless of decoration-skipping behavior.
  • Do not rely on unsupported skipping behavior for essential information.
  • Use semantic HTML when text decorations communicate meaning.
  • Test supported alternatives across target browsers.
  • Provide readable fallback styling when experimental declarations are ignored.

Browser Support

The CSS text-decoration-skip property has limited availability and is deprecated. It is not supported consistently across modern browsers.

Some historical browser implementations recognized only selected values. Modern browser support has generally moved toward text-decoration-skip-ink, which is widely available.

For current compatibility information, visit Can I Use? and search for text-decoration-skip.

Legacy Compatibility

.example {
  text-decoration-line: underline;
  text-decoration-skip: spaces;
}

Do not expect this legacy declaration to produce consistent whitespace skipping across current browsers.

Modern Alternative

.example {
  text-decoration-line: underline;
  text-decoration-skip-ink: auto;
}

This modern property is widely supported for controlling interruptions around glyph ink.

Feature Detection

@supports (text-decoration-skip-ink: auto) {
  .example {
    text-decoration-skip-ink: auto;
  }
}

This checks whether the browser recognizes the modern ink-skipping declaration.

Fallback Example

.example {
  text-decoration: underline;
  text-decoration-skip-ink: auto;
}

The underline remains visible even if the browser does not support the additional ink-skipping control.

Testing Recommendations

Test decoration appearance using different fonts, browsers, and text sizes. Avoid relying on the deprecated property for essential styling.

Specifications

The CSS Text Decoration Module Level 4 draft defines the newer text-decoration-skip shorthand and related skipping properties.

CSS Text Decoration Module Level 4 - Text Decoration Skipping

The specification separates decoration-skipping behavior into more focused controls. Some parts remain draft features and are not broadly implemented.

For documentation of the historical syntax and its deprecated status, consult MDN Web Docs.

MDN Web Docs: text-decoration-skip