Skip to main content



FlatifyCSS uses Nunito typeface by Vernon Adams for its default typography. For code the default is Fira Code.
However these typefaces are not included in the FlatifyCSS package. You can add them in your web page using the following code:

<link rel="preconnect" href="" />
<link rel="preconnect" href="" crossorigin />
href="[email protected];600;700&display=swap"

or import it in your CSS file:

@import url(";600;700&display=swap");

Configuring typography

Inside the _config.scss there is a section for typography configuration.

Font size

FlatifyCSS set the main font size as the :root property, but it depends on the screen size. So there are two variables to set minimum and maximum font sizes inside _config.scss:

$MIN_FONT_SIZE: 14; // must be without unit
$MAX_FONT_SIZE: 16; // must be without unit

Based on this fluid font size you can use the em unit to have the responsive font size and elements, also using em as a unit for elements property gives you better control of the element size, you do not have to change every property to change the element size, just change the font-size property for the element wrapper, this is how size setter helper classes work.

Font family

There are Sass variables to change the font family for different elements:

$PRIMARY_FONT_FAMILY: "Nunito", sans-serif;
$CODE_FONT_FAMILY: "Fira Code", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

you can also change them as CSS variables:

--flatify__primary-font-family: "Nunito", sans-serif;
--flatify__heading-font-family: var(--flatify__primary-font-family);
--flatify__code-font-family: "Fira Code", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

Font size

There are helper classes to change the size of elements, they change the font size based on their size, you can change them to your own sizes:

xs: 0.75em,
sm: 0.9em,
md: 1em,
lg: 1.25em,
2x: 1.5em,
3x: 2.2em,
4x: 2.5em,
5x: 3.14em,

Font weight

You can change default font weights based on the typeface your are using:


or change their CSS variables:

--flatify__medium-font-weight: 600;
--flatify__bold-font-weight: 700;
--flatify__extra-bold-font-weight: 900;
--flatify__heading-font-weight: bold;

Line height

Based on the element line height will be different, you can default line heights with these variables:


or change their CSS variables:

--flatify__base-line-height: 1.5;
--flatify__small-line-height: 1.2;
--flatify__large-line-height: 1.8;