- Services
- Case Studies
- Technologies
- NextJs development
- Flutter development
- NodeJs development
- ReactJs development
- About
- Contact
- Tools
- Blogs
- FAQ
CSS Font-Variant-Ligatures Enhancing Typography
Control common, discretionary, historical ligatures, and more for professional web design.
Introduction
The CSS font-variant-ligatures
property controls the use of ligatures and contextual forms in text. It is widely supported across browsers and devices, making it a reliable tool for web developers and designers to create polished and professional-looking text.
Specification
The font-variant-ligatures
property is part of the CSS Fonts Module Level 4, which standardizes the use of ligatures and contextual forms in web text.
Syntax
Values
normal
: Activates usual ligatures and contextual forms.none
: Disables all ligatures and contextual forms.common-ligatures
: Activates common ligatures likefi
,ffi
, etc.no-common-ligatures
: Deactivates common ligatures.discretionary-ligatures
: Activates specific ligatures defined by the font designer.no-discretionary-ligatures
: Deactivates discretionary ligatures.historical-ligatures
: Activates historical ligatures.no-historical-ligatures
: Deactivates historical ligatures.contextual
: Activates contextual alternates.no-contextual
: Deactivates contextual alternates.
Global Values
inherit
: Inherits the value from the parent element.initial
: Sets the value to its initial default.revert
: Reverts the value to the default specified by the user agent.revert-layer
: Reverts the value to the default for the current layer.unset
: Resets the value to its natural value.
Examples
Common Ligatures vs. No Common Ligatures
HTML
CSS
Discretionary Ligatures
HTML
CSS
Font Variant Ligatures Examples
HTML
CSS
Example Usage with Related Properties
HTML
CSS
Browser Compatibility
The font-variant-ligatures
property is widely supported across modern browsers.
Supported Browsers
- Google Chrome: Since version 34
- Firefox: Since version 34
- Safari: Since version 9.1
- Opera: Since version 21
- Edge: Since version 79
Browser Compatibility Table
Browser | Version |
---|---|
Google Chrome | 34+ |
Firefox | 34+ |
Safari | 9.1+ |
Opera | 21+ |
Edge | 79+ |
Related Properties
font-variant
A shorthand property for setting multiple font variant properties.
font-variant-caps
Controls the use of small capitals and other capitalization styles.
font-variant-emoji
Controls the rendering of emoji characters.
font-variant-east-asian
Controls the rendering of East Asian text.
font-variant-numeric
Controls the rendering of numeric characters.
font-variant-position
Controls the positioning of characters, such as subscript and superscript.
font-feature-settings
Allows you to enable or disable specific OpenType font features.
Conclusion
The font-variant-ligatures
property is a powerful tool for controlling ligatures and contextual forms in text. Along with related properties like font-variant
, font-variant-caps
, and font-variant-numeric
, you can enhance your typography to create polished and professional web designs.
By understanding and using these properties effectively, you can ensure your web design projects are visually appealing and functional across different devices and browsers. Keep testing and stay informed about updates to make the most of these typographic features.
Happy coding!
Talk with CEO
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.