Typography

The Typography Utilities extend Bootstrap with custom font family, font size, writing modes, and text orientation classes. Built using Sass variables, these utilities provide full control over text appearance while following your project's design system.

All classes use the al- prefix and follow utility-first conventions.

Overview

Utility TypeClass FormatDescription
Font Family.al-ff-{fontname}Apply custom font-family
Font Size.al-fs-{value}Font-size in rem
Writing Mode.al-text-vertical-{mode}Writing mode control
Text Orientation.al-text-orientation-uprightText upright orientation
Text Overflow Horizontal.al-text-overflow-hiddenHorizontal text overflow
Text Overflow Vertical.al-text-overflow-hidden-vertical /
.al-text-overflow-hidden-vertical-{value}
Vertcial text overflow
Bootstrap Colors.text-{color}Bootstrap native colors
Both-Mode Text Colors.al-text-{color}-bothColor stable across light/dark modes

Sass Reference

assets/scss/_typography.scss Copy

Class Usage Reference

ClassOutput
.al-ff-robotofont-family: Roboto
.al-ff-cairofont-family: Cairo
.al-fs-16font-size: 1rem
.al-fs-18font-size: 1.125rem
.al-text-vertical-rlwriting-mode: vertical-rl
.al-text-orientation-uprighttext-orientation: upright
.al-text-overflow-hiddentext-overflow: ellipsis, white-space: nowrap, overflow: hidden;
.al-text-overflow-hidden-vertical-webkit-line-clamp: 1, -webkit-box-orient: vertical;
.al-text-overflow-hidden-vertical-2-webkit-line-clamp: 2;
.text-primaryBootstrap color
.al-text-primary-bothcolor: $primary-dark
.al-text-white-bothcolor: #fff
.al-text-black-bothcolor: #000

Examples

Font Family

Roboto Font
Jura Font
Reem kufi fun Font (for arabic) | خط ريم كوفي فن
Cairo Font (for Arabic) | خط القاهرة (لللغة العربية)
Copy

Font Size

Font Size 0.563rem (.al-fs-9)
Font Size 0.625rem (.al-fs-10)
Font Size 0.688rem (.al-fs-11)
Font Size 0.75rem (.al-fs-12)
Font Size 0.813rem (.al-fs-13)
Font Size 0.875rem (.al-fs-15)
Font Size 0.938rem (.al-fs-15)
Font Size 1.0rem (.al-fs-16)
Font Size 1.063rem (.al-fs-17)
Font Size 1.125rem (.al-fs-18)
Copy

Writing Mode: Vertical RL, Sideways LR

Vertical RL
Sideways LR
Copy

Text Orientation: Upright

Upright
Copy

Text Overflow

Horizontal

Horizontal - Text Overflow


Vertical (upto 5 lines)

Single Line text overflow - The Typography Utilities extend Bootstrap with custom font family, font size, writing modes, and text orientation classes. Built using Sass variables, these utilities provide full control over text appearance while following your project's design system.

Two Line text overflow - The Typography Utilities extend Bootstrap with custom font family, font size, writing modes, and text orientation classes. Built using Sass variables, these utilities provide full control over text appearance while following your project's design system.

Three Line text overflow - The Typography Utilities extend Bootstrap with custom font family, font size, writing modes, and text orientation classes. Built using Sass variables, these utilities provide full control over text appearance while following your project's design system. The Typography Utilities extend Bootstrap with custom font family, font size, writing modes, and text orientation classes. Built using Sass variables, these utilities provide full control over text appearance while following your project's design system. The Typography Utilities extend Bootstrap with custom font family, font size, writing modes, and text orientation classes. Built using Sass variables, these utilities provide full control over text appearance while following your project's design system.

Four Line text overflow - The Typography Utilities extend Bootstrap with custom font family, font size, writing modes, and text orientation classes. Built using Sass variables, these utilities provide full control over text appearance while following your project's design system. The Typography Utilities extend Bootstrap with custom font family, font size, writing modes, and text orientation classes. Built using Sass variables, these utilities provide full control over text appearance while following your project's design system. The Typography Utilities extend Bootstrap with custom font family, font size, writing modes, and text orientation classes. Built using Sass variables, these utilities provide full control over text appearance while following your project's design system.

Five Line text overflow - The Typography Utilities extend Bootstrap with custom font family, font size, writing modes, and text orientation classes. Built using Sass variables, these utilities provide full control over text appearance while following your project's design system. The Typography Utilities extend Bootstrap with custom font family, font size, writing modes, and text orientation classes. Built using Sass variables, these utilities provide full control over text appearance while following your project's design system. The Typography Utilities extend Bootstrap with custom font family, font size, writing modes, and text orientation classes. Built using Sass variables, these utilities provide full control over text appearance while following your project's design system.

Copy

Both-Mode Text Colors

Primary Dark Text (Both Mode)

Primary Dark Text (Both Mode)

Primary Dark Text (Both Mode)

Copy

Developer Notes

  • Font families are applied via .al-ff-{fontname}

  • Font sizes fully controlled from $sizes Sass map

  • Writing modes follow CSS logical writing-mode property

  • Both-mode text color utilities ensure consistent appearance across light/dark modes.

  • Fully extendable and scalable system for multilingual and RTL support

  • Global default applied for Arabic using html[lang="ar"] body { font-family: 'Cairo' }