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 make sure you followed the Customization part of your installation.
Headings
All HTML headings, <h1> through <h6>, have their size calculated based on the specified $font-size-base.
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.
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.
<pclass="lead">
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.
</p>
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.
<p>You can use the mark tag to <mark>highlight</mark> text.</p>
<p><del>This line of text is meant to be treated as deleted text.</del></p>
<p><s>This line of text is meant to be treated as no longer accurate.</s></p>
<p><ins>This line of text is meant to be treated as an addition to the document.</ins></p>
<p><u>This line of text will render as underlined</u></p>
<p><small>This line of text is meant to be treated as fine print.</small></p>
<p><strong>This line rendered as bold text.</strong></p>
<p><em>This line rendered as italicized text.</em></p>
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.
<pclass="_text-justify">
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.
</p>
Typography - Left, Center and Right Text Alignment
This text is left aligned.
This text is centered.
This text is right aligned.
<pclass="_text-left">This text is left aligned.</p>
<pclass="_text-center">This text is centered.</p>
<pclass="_text-right">This text is right aligned.</p>
Text Wrapping
You can easily realign text to components with text alignment classes.
Typography - Text Wrapping
This text should overflow the parent.
<divclass="_text-nowrap"style="width: 8rem;">
This text should overflow the parent.
</div>
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.
<pclass="_text-center-xs">This text is centered on extra-small screens.</p>
<pclass="_text-center-sm">This text is centered on small screens.</p>
<pclass="_text-center-md">This text is centered on medium screens.</p>
<pclass="_text-center-lg">This text is centered on large screens.</p>
<pclass="_text-center-xl">This text is centered on extra-large screens.</p>
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.
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.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
<blockquoteclass="blockquote"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p><footer>Someone famous in <citetitle="Source Title">Source Title</cite></footer></blockquote>
<blockquoteclass="blockquote -center"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p><footer>Someone famous in <citetitle="Source Title">Source Title</cite></footer></blockquote>
<blockquoteclass="blockquote -right"><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p><footer>Someone famous in <citetitle="Source Title">Source Title</cite></footer></blockquote>
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
<ul><li>Lorem ipsum dolor sit amet</li><li>Consectetur adipiscing elit</li><li>Integer molestie lorem at massa</li><li>Facilisis in pretium nisl aliquet</li><li>Nulla volutpat aliquam velit
<ul><li>Phasellus iaculis neque</li><li>Purus sodales ultricies</li><li>Vestibulum laoreet porttitor sem</li><li>Ac tristique libero volutpat at</li></ul></li><li>Faucibus porta lacus fringilla vel</li><li>Aenean sit amet erat nunc</li><li>Eget porttitor lorem</li></ul>
Ordered Lists
When enumerating elements in a specific order, use an ordered list.
Typography - Ordered 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
<ol><li>Lorem ipsum dolor sit amet</li><li>Consectetur adipiscing elit</li><li>Integer molestie lorem at massa</li><li>Facilisis in pretium nisl aliquet</li><li>Nulla volutpat aliquam velit
<ul><li>Phasellus iaculis neque</li><li>Purus sodales ultricies</li><li>Vestibulum laoreet porttitor sem</li><li>Ac tristique libero volutpat at</li></ul></li><li>Faucibus porta lacus fringilla vel</li><li>Aenean sit amet erat nunc</li><li>Eget porttitor lorem</li></ol>
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
<ulclass="list -unstyled"><li>Lorem ipsum dolor sit amet</li><li>Consectetur adipiscing elit</li><li>Integer molestie lorem at massa</li><li>Facilisis in pretium nisl aliquet</li><li>Nulla volutpat aliquam velit
<ul><li>Phasellus iaculis neque</li><li>Purus sodales ultricies</li><li>Vestibulum laoreet porttitor sem</li><li>Ac tristique libero volutpat at</li></ul></li><li>Faucibus porta lacus fringilla vel</li><li>Aenean sit amet erat nunc</li><li>Eget porttitor lorem</li></ul>
Inline Lists
Remove a list’s bullets and apply some light margin using the -inline list modifier.
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.
<dlclass="row"><dtclass="column -sm-3">Description lists</dt><ddclass="column -sm-9">A description list is perfect for defining terms.</dd><dtclass="column -sm-3">Euismod</dt><ddclass="column -sm-9"><p>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</p><p>Donec id elit non mi porta gravida at eget metus.</p></dd><dtclass="column -sm-3">Malesuada porta</dt><ddclass="column -sm-9">Etiam porta sem malesuada magna mollis euismod.</dd><dtclass="column -sm-3">Fusce dapibus</dt><ddclass="column -sm-9">Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</dd><dtclass="column -sm-3">Nesting</dt><ddclass="column -sm-9"><dlclass="row"><dtclass="column -sm-4">Nested definition list</dt><ddclass="column -sm-8">Aenean posuere, tortor sed cursus feugiat, nunc augue blandit nunc.</dd></dl></dd></dl>
Sass Variables
Here you can find a list of the Sass variables you can use for typography. If you're looking to find common variables that these rely on, you should take a look at the Sass Variables page.