- CSS Tutorial
- CSS - Home
- CSS - Introduction
- CSS - Syntax
- CSS - Selectors
- CSS - Inclusion
- CSS - Measurement Units
- CSS - Colors
- CSS - Backgrounds
- CSS - Fonts
- CSS - Text
- CSS - Images
- CSS - Links
- CSS - Tables
- CSS - Borders
- CSS - Border Block
- CSS - Border Inline
- CSS - Margins
- CSS - Lists
- CSS - Padding
- CSS - Cursor
- CSS - Outlines
- CSS - Dimension
- CSS - Scrollbars
- CSS - Inline Block
- CSS - Dropdowns
- CSS - Visibility
- CSS - Overflow
- CSS - Clearfix
- CSS - Float
- CSS - Arrows
- CSS - Resize
- CSS - Quotes
- CSS - Order
- CSS - Position
- CSS - Hyphens
- CSS - Hover
- CSS - Display
- CSS - Focus
- CSS - Zoom
- CSS - Translate
- CSS - Height
- CSS - Hyphenate Character
- CSS - Width
- CSS - Opacity
- CSS - Z-Index
- CSS - Bottom
- CSS - Navbar
- CSS - Overlay
- CSS - Forms
- CSS - Align
- CSS - Icons
- CSS - Image Gallery
- CSS - Comments
- CSS - Loaders
- CSS - Attr Selectors
- CSS - Combinators
- CSS - Root
- CSS - Box Model
- CSS - Counters
- CSS - Clip
- CSS - Writing Mode
- CSS - Unicode-bidi
- CSS - min-content
- CSS - All
- CSS - Inset
- CSS - Isolation
- CSS - Overscroll
- CSS - Justify Items
- CSS - Justify Self
- CSS - Tab Size
- CSS - Pointer Events
- CSS - Place Content
- CSS - Place Items
- CSS - Place Self
- CSS - Max Block Size
- CSS - Min Block Size
- CSS - Mix Blend Mode
- CSS - Max Inline Size
- CSS - Min Inline Size
- CSS - Offset
- CSS - Accent Color
- CSS - User Select
- CSS Advanced
- CSS - Grid
- CSS - Grid Layout
- CSS - Flexbox
- CSS - Visibility
- CSS - Positioning
- CSS - Layers
- CSS - Pseudo Classes
- CSS - Pseudo Elements
- CSS - @ Rules
- CSS - Text Effects
- CSS - Paged Media
- CSS - Printing
- CSS - Layouts
- CSS - Validations
- CSS - Image Sprites
- CSS - Important
- CSS - Data Types
- CSS3 Tutorial
- CSS3 - Tutorial
- CSS - Rounded Corner
- CSS - Border Images
- CSS - Multi Background
- CSS - Color
- CSS - Gradients
- CSS - Box Shadow
- CSS - Box Decoration Break
- CSS - Caret Color
- CSS - Text Shadow
- CSS - Text
- CSS - 2d transform
- CSS - 3d transform
- CSS - Transition
- CSS - Animation
- CSS - Multi columns
- CSS - Box Sizing
- CSS - Tooltips
- CSS - Buttons
- CSS - Pagination
- CSS - Variables
- CSS - Media Queries
- CSS - Functions
- CSS - Math Functions
- CSS - Masking
- CSS - Shapes
- CSS - Style Images
- CSS - Specificity
- CSS - Custom Properties
- CSS Responsive
- CSS RWD - Introduction
- CSS RWD - Viewport
- CSS RWD - Grid View
- CSS RWD - Media Queries
- CSS RWD - Images
- CSS RWD - Videos
- CSS RWD - Frameworks
- CSS References
- CSS - Questions and Answers
- CSS - Quick Guide
- CSS - References
- CSS - Color References
- CSS - Web browser References
- CSS - Web safe fonts
- CSS - Units
- CSS - Animation
- CSS Resources
- CSS - Useful Resources
- CSS - Discussion
CSS - font-variant-ligatures Property
The font-variant-ligatures property in CSS is used to control the use of ligatures in text. Ligatures are artistic letter combinations used in some typefaces to improve legibility and aesthetics. This property allows you to enable or disable specific types of ligatures in text.
Possible Values
normal: Default value, allowing ligatures to be used as defined by the font.
none: All ligatures and contextual forms are disabled.
<common-lig-values>: Enables commonly required ligatures, such as fi, ffi, th or similar. Corresponds to OpenType values liga and clig.
common-ligatures: Activates the above mentioned ligatures.
no-common-ligatures: Deactivates the above mentioned ligatures.
<discretionary-lig-values>: Controls specific ligatures. Corresponds to OpenType value dlig.
discretionary-ligatures: Activates the above mentioned ligatures.
no-discretionary-ligatures: Deactivates the above mentioned ligatures.
<historical-lig-values>: Controls the historical ligatures. Corresponds to OpenType value hlig.
historical-ligatures: Activates the above mentioned ligatures.
no-historical-ligatures: Deactivates the above mentioned ligatures.
<contextual-alt-values>: Enables contextual ligatures, which depend on the surrounding characters. Corresponds to OpenType value calt.
contextual: Activates the above mentioned ligatures. Keyword normal also activates these ligatures.
no-contextual: Deactivates the above mentioned ligatures.
Applies to
All the HTML elements.
DOM Syntax
object.style.fontVariantLigatures = "normal | none | <common-lig-values>";
CSS font-variant-ligatures - Basic Example
Here is an example:
<html> <head> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto Mono"> <style> p { font-family: "Roboto Mono", serif; } .normal { font-variant-ligatures: normal; } .none { font-variant-ligatures: none; } .com-lig { font-variant-ligatures: common-ligatures; } .no-com-lig { font-variant-ligatures: no-common-ligatures; } .disc-lig { font-variant-ligatures: discretionary-ligatures; } .no-disc-lig { font-variant-ligatures: no-discretionary-ligatures; } .hist-lig { font-variant-ligatures: historical-ligatures; } .no-hist-lig { font-variant-ligatures: no-historical-ligatures; } .context { font-variant-ligatures: contextual; } .no-context { font-variant-ligatures: no-contextual; } </style> </head> <body> <p class="normal"> normal - if fi ff tf ft jf fj </p> <p class="none"> none - if fi ff tf ft jf fj </p> <p class="com-lig"> common-ligatures - if fi ff tf ft jf fj </p> <p class="no-com-lig"> no-common-ligatures - if fi ff tf ft jf fj </p> <p class="disc-lig"> discretionary-ligatures - if fi ff tf ft jf fj </p> <p class="no-disc-lig"> no-discretionary-ligatures - if fi ff tf ft jf fj </p> <p class="hist-lig"> historical-ligatures - if fi ff tf ft jf fj </p> <p class="no-hist-lig"> no-historical-ligatures - if fi ff tf ft jf fj </p> <p class="context"> contextual - if fi ff tf ft jf fj </p> <p class="no-context"> no-contextual - if fi ff tf ft jf fj </p> </body> </html>
Note: Change the font-family to another value and observe the change.