Typography

Examples and documentation for typography, one of the most important design elements of an application.

Inkline provides you with basic elements, typography, and link styles. It uses a native font stack that selects the best font family for each OS and device. The base font size is 1rem, so visitors can customize their font size as needed when zooming.

When more control is needed, you should check out the textual utility classes. Each font size, style and weight also has a corresponding helper class to style other elements the same.

Configuration

When configuring the Sass files, change the $font-family-primary-base, $font-size, and $line-height-base variables as our typographic base applied to the <body>. Set the global link color via $link-color and apply link underlines only on :hover. The defaults for these global variables are defined in config/_typography.scss.

To learn more about style configuration, please read the Customization section.

Headings

All HTML headings, <h1> through <h6>, are available.

Typography - Headings

h1. Inkline heading

h2. Inkline heading

h3. Inkline heading

h4. Inkline heading

h5. Inkline heading
h6. Inkline heading

You can use helper classes to achieve heading styles. Classes .h1 through .h6 are available, for when you want to match the font styling of a heading but cannot use the associated HTML element.

Typography - Heading Helpers
h1. Inkline heading
h2. Inkline heading
h3. Inkline heading
h4. Inkline heading
h5. Inkline heading
h6. Inkline heading

Displays

If you need something larger than headings, you can use displays, .d1 through .d6 are available.

Typography - Display
d1. Inkline display
d2. Inkline display
d3. Inkline display
d4. Inkline display
d5. Inkline display
d6. Inkline display

Lead

Make a paragraph stand out by adding .lead.

Typography - Lead

Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.

Inline Text Elements

Inkline provides basic styling for all common HTML5 inline text elements.

Typography - Inline Text Elements

You can use the mark tag to highlight text.

This line of text is meant to be treated as deleted text.

This line of text is meant to be treated as no longer accurate.

This line of text is meant to be treated as an addition to the document.

This line of text will render as underlined

This line of text is meant to be treated as fine print.

This line rendered as bold text.

This line rendered as italicized text.

To avoid any unwanted semantic implications that the tags would bring, .mark and .small classes are also available to apply the same styles as <mark> and <small>.

While not shown above, you can also use <b> and <i> in HTML5. <b> is meant to highlight words or phrases without adding additional semantics, while <i> is mostly for voice, technical terms, etc.

Text Utilities

You can change text alignment, transform, style, weight, and color with text utilities and color utilities.

Text Alignment

You can easily realign text to components with text alignment classes.

Typography - Justified Text Alignment

Ambitioni dedisse scripsisse iudicaretur. Cras mattis iudicium purus sit amet fermentum. Donec sed odio operae, eu vulputate felis rhoncus. Praeterea iter est quasdam res quas ex communi. At nos hinc posthac, sitientis piros Afros. Petierunt uti sibi concilium totius Galliae in diem certam indicere. Cras mattis iudicium purus sit amet fermentum.

Typography - Left, Center and Right Text Alignment

This text is left aligned.

This text is centered.

This text is right aligned.

Text Wrapping

You can easily realign text to components with text alignment classes.

Typography - Text Wrapping
This text should overflow the parent.

Responsive Utilities

You can align, wrap or truncate text responsively for any given xs, sm, md, lg, or xl breakpoint by adding the breakpoint suffix:

Typography - Responsive Text Alignment

This text is centered on extra-small screens.

This text is centered on small screens.

This text is centered on medium screens.

This text is centered on large screens.

This text is centered on extra-large screens.

Abbreviations

The HTML <abbr> element for abbreviations and acronyms is styled to show the expanded version on hover. Abbreviations have a default underline and gain a help cursor to provide additional context on hover and to users of assistive technologies.

Typography - Abbreviations

attr

HTML

Blockquotes

To quote blocks of content from another source within your document, wrap <blockquote class="blockquote"> around any HTML as the quote.

Blockquote Alignment

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Someone famous in Source Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Someone famous in Source Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Someone famous in Source Title

Lists

To enumerate a sequence of elements, you can use lists. Inkline provides you with multiple variations to achieve your target design.

Unordered Lists

When enumerating elements in no specific order, use an unordered list.

Typography - Unordered Lists
  • Lorem ipsum dolor sit amet
  • Consectetur adipiscing elit
  • Integer molestie lorem at massa
  • Facilisis in pretium nisl aliquet
  • Nulla volutpat aliquam velit
    • Phasellus iaculis neque
    • Purus sodales ultricies
    • Vestibulum laoreet porttitor sem
    • Ac tristique libero volutpat at
  • Faucibus porta lacus fringilla vel
  • Aenean sit amet erat nunc
  • Eget porttitor lorem

Ordered Lists

When enumerating elements in a specific order, use an ordered list.

Typography - Ordered Lists
  1. Lorem ipsum dolor sit amet
  2. Consectetur adipiscing elit
  3. Integer molestie lorem at massa
  4. Facilisis in pretium nisl aliquet
  5. Nulla volutpat aliquam velit
    • Phasellus iaculis neque
    • Purus sodales ultricies
    • Vestibulum laoreet porttitor sem
    • Ac tristique libero volutpat at
  6. Faucibus porta lacus fringilla vel
  7. Aenean sit amet erat nunc
  8. Eget porttitor lorem

Unstyled Lists

To remove the default list-style and margin on list items, use the -unstyled modifier. This applies to immediate children list items only, meaning you will need to add the class for any nested lists as well.

Typography - Unstyled Lists
  • Lorem ipsum dolor sit amet
  • Consectetur adipiscing elit
  • Integer molestie lorem at massa
  • Facilisis in pretium nisl aliquet
  • Nulla volutpat aliquam velit
    • Phasellus iaculis neque
    • Purus sodales ultricies
    • Vestibulum laoreet porttitor sem
    • Ac tristique libero volutpat at
  • Faucibus porta lacus fringilla vel
  • Aenean sit amet erat nunc
  • Eget porttitor lorem

Inline Lists

Remove a list’s bullets and apply some light margin using the -inline list modifier.

Typography - Inline Lists
  • Lorem ipsum
  • Phasellus iaculis
  • Nulla volutpat

Description Lists

Remove a list’s bullets and apply some light margin using the -inline list modifier.

Typography - Description Lists
Description lists
A description list is perfect for defining terms.
Euismod

Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.

Donec id elit non mi porta gravida at eget metus.

Malesuada porta
Etiam porta sem malesuada magna mollis euismod.
Fusce dapibus
Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.
Nesting
Nested definition list
Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc.