- 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:
/* Single keyword */text-decoration-skip-ink: none;text-decoration-skip-ink: auto;text-decoration-skip-ink: all;
/* Global keywords */text-decoration-skip-ink: inherit;text-decoration-skip-ink: initial;text-decoration-skip-ink: revert;text-decoration-skip-ink: revert-layer;text-decoration-skip-ink: unset;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.
text-decoration-skip-ink: none;auto:- The default value. The browser may interrupt underlines and overlines to avoid touching glyphs.
text-decoration-skip-ink: auto;all:- The browser must interrupt underlines and overlines to avoid touching glyphs.
text-decoration-skip-ink: all;
Additionally, the property supports global keywords:
inherit:- Inherits the value from the parent element.
text-decoration-skip-ink: inherit;initial:- Sets the property to its initial value, which is
auto.
text-decoration-skip-ink: initial;- Sets the property to its initial value, which is
revert:- Resets the property to the user agent’s default stylesheet value.
text-decoration-skip-ink: revert;revert-layer:- Resets the property to the value defined by the user agent stylesheet, if any, for the originating layer.
text-decoration-skip-ink: revert-layer;unset:- Resets the property to its natural value, which means it behaves as either
inheritorinitial.
text-decoration-skip-ink: unset;- 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:
text-decoration-skip-ink = auto | none | allExamples
HTML
<p>You should go on a quest for a cup of coffee.</p><p class="no-skip-ink">Or maybe you'd prefer some tea?</p><p>この文は、 text-decoration-skip-ink: auto の使用例を示しています。</p><p class="skip-ink-all"> この文は、 text-decoration-skip-ink: all の使用例を示しています。</p>CSS
p { font-size: 1.5em; text-decoration: underline blue; text-decoration-skip-ink: auto; /* this is the default anyway */}
.no-skip-ink { text-decoration-skip-ink: none;}
.skip-ink-all { text-decoration-skip-ink: all;}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.
สร้างเว็บไซต์ 1 เว็บ ต้องใช้งบเท่าไหร่? เจาะลึกทุกองค์ประกอบ website development cost อยากสร้างเว็บไซต์แต่ไม่มั่นใจในเรื่องของงบประมาณ อ่านสรุปเจาะลึกตั้งแต่ดีไซน์, ฟังก์ชัน และการดูแล พร้อมตัวอย่างงบจริงจาก Till it’s done ที่แผนชัด งบไม่บานปลายแน่นอน
Next.js สอน 14 ขั้นตอนเบื้องต้น: สร้างโปรเจกต์แรกใน 30 นาที เริ่มต้นกับ Next.js ใน 14 ขั้นตอนเพียงแค่ 30 นาที พร้อม SSR/SSG และ API Routes ด้วยตัวอย่างโค้ดง่าย ๆ อ่านต่อเพื่อสร้างโปรเจ็กต์แรกได้ทันทีที่นี่
วิธีสมัคร Apple Developer Account เพื่อนำแอปขึ้น App Store ทีละขั้นตอน อยากปล่อยแอปบน App Store ระดับโลก มาอ่านคู่มือสมัคร Apple Developer Account พร้อมเคล็ดลับ TestFlight และวิธีอัปโหลดที่ง่ายในบทความเดียวนี้ได้เลย
TypeScript Interface คืออะไร? อธิบายพร้อมวิธีใช้และข้อแตกต่างจาก Type เรียนรู้วิธีใช้ TypeScript Interface เพื่อสร้างโครงสร้างข้อมูลที่ปลอดภัยและเข้าใจง่าย พร้อมเปรียบเทียบข้อดีข้อแตกต่างกับ Type ที่คุณต้องรู้ ถูกรวมเอาไว้ในบทความนี้แล้ว
Material-UI (MUI) คืออะไร อยากสร้าง UI สวยงามและเป็นมืออาชีพในเวลาอันรวดเร็วใช่ไหม มาทำความรู้จักกับ Material-UI (MUI) ที่ช่วยให้คุณพัฒนาแอปพลิเคชันบน React ได้ง่ายและดูดีในทุกอุปกรณ์
เปรียบเทียบ 3 วิธีติดตั้ง install node js บน Ubuntu: NVM vs NodeSource vs Official Repo แบบไหนดีที่สุด? เรียนรู้วิธีติดตั้ง Node.js บน Ubuntu ด้วย NVM, NodeSource หรือ Official Repo เลือกวิธีที่เหมาะกับความต้องการของคุณ พร้อมเปรียบเทียบ เพื่อการพัฒนาที่มีประสิทธิภาพ! พูดคุยกับซีอีโอ
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.