The font-variant-ligatures
CSS property controls which ligatures and contextual forms are used in textual content of the elements it applies to. This leads to more harmonized forms in the resulting text.
/* Keyword values */ font-variant-ligatures: normal; font-variant-ligatures: none; font-variant-ligatures: common-ligatures; /* <common-lig-values> */ font-variant-ligatures: no-common-ligatures; /* <common-lig-values> */ font-variant-ligatures: discretionary-ligatures; /* <discretionary-lig-values> */ font-variant-ligatures: no-discretionary-ligatures; /* <discretionary-lig-values> */ font-variant-ligatures: historical-ligatures; /* <historical-lig-values> */ font-variant-ligatures: no-historical-ligatures; /* <historical-lig-values> */ font-variant-ligatures: contextual; /* <contextual-alt-values> */ font-variant-ligatures: no-contextual; /* <contextual-alt-values> */ font-variant-ligatures: contextual; /* <no-historical-ligatures> <common-ligatures> */ /* Global values */ font-variant-ligatures: inherit; font-variant-ligatures: initial; font-variant-ligatures: unset;
The font-variant-ligatures
property is specified as one of the keyword values listed below.
normal
none
fi
, ffi
, th
or similar. They correspond to the OpenType values liga
and clig
. Two values are possible: common-ligatures
activating these ligatures. Note that the keyword normal
activates these ligatures.no-common-ligatures
deactivating these ligatures.dlig
. Two values are possible: discretionary-ligatures
activating these ligatures.no-discretionary-ligatures
deactivating the ligatures. Note that the keyword normal
usually deactivates these ligatures.hlig
. Two values are possible: historical-ligatures
activating these ligatures.no-historical-ligatures
deactivating the ligatures. Note that the keyword normal
usually deactivates these ligatures.calt
. Two values are possible: contextual
specifies that the contextual alternates are to be used. Note that the keyword normal
usually activates these ligatures too.no-contextual
prevents their use.normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]where
<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 ]
p { font-variant-ligatures: none; }
<p>Hello there</p>
Specification | Status | Comment |
---|---|---|
CSS Fonts Module Level 3 The definition of 'font-variant-ligatures' in that specification. | Candidate Recommendation | Initial definition |
Initial value | normal |
---|---|
Applies to | all elements. It also applies to ::first-letter and ::first-line . |
Inherited | yes |
Media | visual |
Computed value | as specified |
Animation type | discrete |
Canonical order | order of appearance in the formal grammar of the values |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | 34
|
No | 34
|
No | 21
|
9.1
|
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | 37
|
34 | No | 34
|
21 | Yes
|
Yes |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-ligatures