What Is the New CSS ‘ic’ Unit and How Does It Measure CJK Text Width?

The CSS ‘ic’ unit, introduced in CSS 4, measures length based on the width of a CJK ideograph, allowing developers to specify dimensions such as ‘max-width: 2ic’ to span exactly two CJK characters, with a default value equivalent to 1 em.

JavaScript
JavaScript
JavaScript
What Is the New CSS ‘ic’ Unit and How Does It Measure CJK Text Width?

CSS ‘ic’ is a new length unit designed for CJK ideographic characters (Chinese, Japanese, Korean, etc.), which controls length based on the width of a character. For example, max-width=2ic makes the container width equal to two CJK characters. It is part of the CSS 4 standard and defaults to 1 em.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

FrontendCSSCJKCSS4ic unit
JavaScript
Written by

JavaScript

Provides JavaScript enthusiasts with tutorials and experience sharing on web front‑end technologies, including JavaScript, Node.js, Deno, Vue.js, React, Angular, HTML5, CSS3, and more.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.