Loading

Loading

Typography

Learn how to work with the default style of the Typography elements and its utility classes to build your content as you see fit

Overview

typography is the essence of the web application and with phenix, you have a standard typography styling by default with great helper utilities class names to transform and change your content you need first you need to keep in mind the default Reset style from the document before,

and you can start working with the typography elements you can start by customizing the font properties and responsive base line sizes for everything related like the example below,

in this document, we will cover an example of the default style of the typography elements alongside the utility class names to control these elements and keep in mind: the font-family is applied to the <body> and automatically inherited globally throughout Phenix DS.

:root {
    /*==== Font Families ====*/
    --primary-font   : 'Fira Sans', sans-serif;  /*===> Headlines */
    --secondary-font : 'Fira Sans', sans-serif;  /*===> Global Text */
    --icons-font: "Font Awesome 5";
    /*==== Font Weight ====*/
    --thin-weight   : 100;
    --xlight-weight : 200;
    --light-weight  : 300;
    --normal-weight : 400;
    --medium-weight : 500;
    --bold-weight   : 600;
    --strong-weight : 700;
    --xbold-weight  : 800;
    --black-weight  : 900;
    /*==== Standard Line-Height ====*/
    --line-height: 1.625;
}
/*==== Responsive REM Base ====*/
:root {
    --rem-xl : 16px; /*===> xLarge Screens and Up */
    --rem-lg : 16px; /*===> Large Screens and Up */
    --rem-md : 15px; /*===> Medium Screens and Up */
    --rem-sm : 15px; /*===> Small Screens and Up */
    --rem-xs : 15px; /*===> Extra Small Screens and Up */
}

Headings

All heading elements <h1>—<h6> and <p> are reset to have them margin-top removed. Headings have margin-bottom: .5rem added and paragraphs margin-bottom: 1rem for easy spacing.

ElementFont Size
<h1>, .h12rem
<h2>, .h21.75rem
<h3>, .h31.5625rem
<h4>, .h41.4375rem
<h5>, .h51.25rem
<h6>, .h61.0625rem

Display headings

the display headlines are extra large Heading font-size that applies only for Desktop screens and beyond.

Class Name Example Font Size.display-h1Display Title Level – 13.875rem (62px).display-h2Display Title Level – 23.25rem (52px).display-h3Display Title Level – 33rem (48px).display-h4Display Title Level – 42.75rem (44px).display-h5Display Title Level – 52.5rem (40px).display-h6Display Title Level – 62.25rem (36px)

Default Lists

All lists—<ul>, <ol>, and <dl>—have their margin-top removed and a margin-bottom: 1rem. Nested lists have no margin-bottom. We’ve also reset the padding-left on <ul> and <ol> elements.

  • All lists have their top margin removed
  • And their bottom margin normalized
  • Nested lists have no bottom margin
    • This way they have a more even appearance
    • Particularly when followed by more list items
  • The left padding has also been reset
  1. All lists have their top margin removed
  2. And their bottom margin normalized
  3. Nested lists have no bottom margin ◦ This way they have a more even appearance ◦ Particularly when followed by more list items
  4. The left padding has also been reset

Description Lists

For simpler styling, clear hierarchy, and better spacing, description lists have been updated margins. <dd>s reset margin-left to 0 and add margin-bottom: .5rem. <dt>s are bolded.

Utilities & Alignment

in the table below you will find all Typography utility class names to help you control your content and style it in the best way you see fit.

ClassnameDescription
.tx-align-startalign the text to the page direction start
.tx-align-centeralign the text to the center
.tx-align-endalign the text to the page direction end
.tx-align-justifyalign the paragraph lines equal length as width.
.tx-align-leftalways align the text to the left
.tx-align-rightalways align the text to the right
.tx-uppercasetransforms the text to UPPERCASE
.tx-underlineadding a line under the text
.tx-capitalizetransforms the first character for each word Capital.
.tx-line-throughdecorating the text by adding a line through it.
.weight-thinadding font-weight (100)
.weight-xlightadding font-weight (200)
.weight-lightadding font-weight (300)
.weight-normaladding font-weight (400)
.weight-mediumadding font-weight (500)
.weight-boldadding font-weight (600)
.weight-strongadding font-weight (700)
.weight-xboldadding font-weight (800)
.weight-blackadding font-weight (900)
.tx-nowrapmaking all the text in one line and hiding any overflowed text.
.lineheight-100adding line-height by 100%.
.lineheight-120adding line-height by 120%.
.lineheight-130adding line-height by 130%.
.lineheight-150adding line-height by 150%.
.lineheight-160adding line-height by 160%.
.lineheight-170adding line-height by 170%.
.lineheight-180adding line-height by 180%.
.lineheight-inheritadding line-height:inhrite.

Font sizes

in the table below you will find all font-size utility class names to help you control your content and style it in the best way you see fit, and it can be used from a specific breakpoint and up using .fs-{breakpoint}-* classes pattern

ClassnameDescription
.fs-12adding font-size of 12px
.fs-13adding font-size of 13px
.fs-14adding font-size of .875rem (14px)
.fs-15adding font-size of .9375rem (15px)
.fs-16adding font-size of 1rem (16px)
.fs-17adding font-size of 1.0625rem (17px)
.fs-18adding font-size of 1.125rem (18px)
.fs-19adding font-size of 1.1875rem (19px)
.fs-20adding font-size of 1.25rem (20px)
.h6adding font-size of 1.25rem (17px)
.h5adding font-size of 1.25rem (20px)
.h4adding font-size of 1.25rem (23px)
.h3adding font-size of 1.25rem (25px)
.h2adding font-size of 1.25rem (28px)
.h1adding font-size of 1.25rem (32px)
.display-h6adding display font-size 2.25rem (36px)
.display-h5adding display font-size 2.5rem (40px)
.display-h4adding display font-size 2.75rem (44px)
.display-h3adding display font-size 3rem (48px)
.display-h2adding display font-size 3.25rem (52px)
.display-h1adding display font-size 3.875rem (62px)
.display-{breakpoint}-h*adding display font-size from a specific screen breakpoint and up
.small-textadding font-size of 0.875rem
.large-textadding font-size of 1.125rem and 1.25rem for xLarge screens
.fs-{breakpoint}-*adding font-size from a specific screen breakpoint and up

All rights reserved © 2016 – 2024 Phenix Tools (Abdullah.Ramadan)

On This Page