Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

font-variant-ligatures — controlling ligatures

The font-variant-ligatures property controls ligatures and contextual alternates available in a font. It is inherited.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

font-variant-ligatures: normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ];
<common-lig-values> = common-ligatures | no-common-ligatures
<discretionary-lig-values> = discretionary-ligatures | no-discretionary-ligatures
<historical-lig-values> = historical-ligatures | no-historical-ligatures
<contextual-alt-values> = contextual | no-contextual

font-variant-ligatures controls common, discretionary and historical ligatures, plus contextual alternates. The initial normal enables common ligatures and contextual alternates in OpenType, but not discretionary or historical ligatures.

none disables the features covered by this property, not required rlig ligatures. The no- prefix disables its group. The || notation permits combining different groups in any order, without contradictory pairs; normal and none stand alone.

The property is inherited. Its effect depends on the font; font-feature-settings can override these settings. The example preserves text rather than guaranteeing visual differences.

Examples

<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>font-variant-ligatures</title>
<style>
  p { font-family: serif; font-size: 32px; }
  .normal { font-variant-ligatures: normal; }
  .none { font-variant-ligatures: none; }
</style>
<p class="normal">office ffi fi fl</p>
<p class="none">office ffi fi fl</p>
</html>

Result

office ffi fi fl
office ffi fi fl

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources