Typography

How to use the typography system.

Usage

Styles

sass
@use "~@iraiser/biscuit-design-components/components/typography/styles";

HTML structure

html
<body class="bdc-typography">
    <h1 class="bdc-typography--headline-1">Headline 1</h1>
</body>

Typeface

The default type face is "Proxima Nova".

"Proxima Nova" is not a free font family, you need to the Typekit CSS source link managed by iRaiser: https://use.typekit.net/orc1toy.css. If you have any issue with the link, check with your project manager.

Scales

NameDescription
bodySet the "body" properties.
body-2Set the "second body" properties.
headline-1Set the "headline 1" properties.
headline-2Set the "headline 2" properties.
headline-3Set the "headline 3" properties.
headline-4Set the "headline 4" properties.
headline-5Set the "headline 5" properties.
headline-6Set the "headline 6" properties.
subtitleSet the "subtitle" properties.
captionSet the "caption" properties.
overlineSet the "overline" properties.
buttonSet the "button" properties.

Theming

See the "Theming" section on theme documentation for more customization options.

Theming with CSS custom properties

Set custom styles on global...

sass
:root {
    --bdc-typography-font-family: "Open Sans", sans-serif;
}

...or on a specific element:

sass
.foo-text-field {
    --bdc-typography-font-family: "Open Sans", sans-serif;
}

Theming with Sass variables

Set global theme colors in your Sass file:

sass
@use "~@iraiser/biscuit-design-components/components/typography" with (
    $base: (
        font-family: "Open Sans", sans-serif,
    )

    $styles-headline-2: (
        line-height: 1.5,
        font-size: 20px
    )
);

Style customization

The variable {style} in the documentation correspond with the list of scales, do not hesitate to check it for more examples.

CSS classes

CSS ClassDescription
bdc-typographySet the font properties.
bdc-typography--{style}Set the selected style.

CSS custom properties

CSS Custom PropertyDescription
--bdc-typography-font-familyOverride the base font family in global.
--bdc-typography-{style}-font-familyOverride the selected style font family.

Sass variables

VariableDescription
$baseSet the font properties.
$styles-{style}Set the selected style properties.

Sass mixins

MixinDescription
typography($style, $ellipsis)Set the selected style on selector.
ellipsisSet ellipsis properties.

Usage

sass
@use "~@iraiser/biscuit-design-components/components/typography";

.foo {
    @include typography.typography(body);
}