- Services
- Case Studies
- Technologies
- NextJs development
- Flutter development
- NodeJs development
- ReactJs development
- About
- Contact
- Tools
- Blogs
- FAQ
CSS text-decoration-skip-ink Enhance Text Readability
Enhance text readability by controlling underline and overline interactions with glyphs.
Choose from auto, none, or all options.
Introduction
The text-decoration-skip-ink
CSS property controls how underlines and overlines are drawn when they intersect with the ascenders and descenders of text glyphs. This property is particularly useful for improving the readability of text, especially in languages with complex characters like Chinese, Japanese, and Korean (CJK).
Specification
The text-decoration-skip-ink
property is defined in the CSS Text Decoration Module Level 4. This module describes the behavior of text decorations and how they interact with text content. The property ensures that decorations do not interfere with the readability of the text.
Description
The text-decoration-skip-ink
property controls how underlines and overlines are drawn when they pass over the ascenders and descenders of glyphs. This property improves text readability by preventing decorations from intersecting with characters.
The property has three main values:
auto
: The default value. The browser may interrupt underlines and overlines to avoid touching glyphs.none
: Underlines and overlines are drawn continuously across the text, even if they intersect with glyphs.all
: The browser must interrupt underlines and overlines to avoid touching glyphs. This is particularly useful for CJK fonts.
Syntax
The text-decoration-skip-ink
property is easy to use. Here’s the syntax:
Values
The text-decoration-skip-ink
property accepts the following values:
none
:- Underlines and overlines are drawn continuously across the text, even if they intersect with glyphs.
auto
:- The default value. The browser may interrupt underlines and overlines to avoid touching glyphs.
all
:- The browser must interrupt underlines and overlines to avoid touching glyphs.
Additionally, the property supports global keywords:
inherit
:- Inherits the value from the parent element.
initial
:- Sets the property to its initial value, which is
auto
.
- Sets the property to its initial value, which is
revert
:- Resets the property to the user agent’s default stylesheet value.
revert-layer
:- Resets the property to the value defined by the user agent stylesheet, if any, for the originating layer.
unset
:- Resets the property to its natural value, which means it behaves as either
inherit
orinitial
.
- Resets the property to its natural value, which means it behaves as either
Formal Definition
- Initial Value:
auto
- Applies To: All elements
- Inherited: Yes
- Computed Value: As specified
- Animation Type: Discrete
Formal Syntax
The formal syntax for the text-decoration-skip-ink
property is:
Examples
HTML
CSS
Result
The above code demonstrates how the text-decoration-skip-ink
property affects the rendering of underlines and overlines in different scenarios. The auto
value shows the default behavior, the none
value shows continuous underlines, and the all
value ensures that underlines are always interrupted to avoid touching glyphs.
Browser Compatibility
The text-decoration-skip-ink
property is supported by most modern browsers:
- Google Chrome 64
- Edge 79
- Firefox 70
- Opera 50
- Safari 15.4
See Also
For more information on related CSS properties, you can refer to:
- [
text-decoration
]WebsiteUrl - [
text-decoration-skip
]WebsiteUrl
These properties work together with text-decoration-skip-ink
to control various aspects of text decoration in web design.
By understanding and utilizing the text-decoration-skip-ink
property, you can enhance the readability and visual appeal of your web content, providing a better user experience.
Talk with CEO
We'll be right here with you every step of the way.
We'll be here, prepared to commence this promising collaboration.
Whether you're curious about features, warranties, or shopping policies, we provide comprehensive answers to assist you.