ic

The width of the CJK water ideograph (水) in the current font.

Safe to useBaseline: widely available

First version with support, from MDN browser data
BrowserSince
Chrome106+
Chrome Android106+
Edge106+
Firefox97+
Firefox Android97+
Safari15.4+
Safari iOS15.4+

Formula 1ic = advance of 水 (U+6C34) in the element's font (1em if it cannot be measured)

How it works

1ic is the advance of the CJK water ideograph 水 (U+6C34) in the element’s font. Chinese, Japanese and Korean text is set on a grid of equal cells, and this one glyph stands in for the cell: inline-size: 20ic holds a line of twenty ideographs in that font, and text-indent: 1ic indents by one.

The glyph is measured, so the number belongs to the font. In Chromium, a test font whose 水 was 0.9em wide gave 1ic of 0.9em, and one whose 水 was exactly an em gave 1em. The word in the specification is advance measure, the distance a glyph takes along the line.

A font with no ideographs gives the browser nothing to measure. The specification then assumes one em, and Chromium does so: in IBM Plex Sans, 1ic came out as exactly the font size. On a page that mixes scripts, ic can quietly turn into em for Latin-only fonts.

The rounding described for ch applies here too: on Linux, Chromium 156 gave 1ic of 14px for an ideograph that advances 14.4px, and macOS gave 14.4px.

Try it

Measure the font-relative units

Pick a font and a size. The page measures 1em, 1ex, 1ch, 1cap and 1lh in that font, here, in your browser.

UnitMeasuredShare of the font size
1em
1ex
1ch
1cap
1lh
The same as a table
What each font-relative unit measures
UnitMeasures
1emThe font size of the element.
1exHow tall the letter x is in this font.
1chThe width of the digit zero in the font.
1capThe height of a capital letter in the font.
1lhThe line height of the element.

What changes it

Moves with
  • the reader's text size
  • page zoom
  • the font in use
Stays put under
  • the window size
  • the query container
  • phone toolbars
  • the writing mode

Reach for it when

Line lengths and indents counted in ideographs in Chinese, Japanese or Korean text.

Watch out

A font without CJK glyphs cannot measure the ideograph, and the unit falls back to 1em. Two different Latin fonts then report the same ic.

Example ch counts Latin zeros; ic counts ideographs, so the line holds about forty of them.

Before

.note {
  max-inline-size: 40ch;
}

After

.note {
  max-inline-size: 40ic;
}

MDN (opens in a new tab)Specification (opens in a new tab)