Text Sizes
The tags h1, h2, h3, and h4 are styled by default and will appear as follows when the size is not multiplied by text-* classes:
Heading 1
Heading 2
Heading 3
Heading 4
WebUI does not define any base font size and just uses the browser default. The following classes can be used to set different sizes relative to the browser font size or parent element font size:
In order to increase or decrease the font size for the body, container, or even a single column, you just need to add one of the above classes to it. Then, any classes you use within that element will size relative to the parent font size. However, if you use the class text-md there will be no inherited change because text-md is actually 1em, which means multiply by 1.
For example, if you use text-lg on a container and specify text-lg on any columns within that container, then the text size would actually be equivalent to 20.25px for those columns, based on a browser font size of 16px.
Scalable Text
WebUI also provides progressive font rendering. It works by gradually increasing or decreasing the text size between the smallest and largest breakpoints. The table below shows each text size and its range.
Large text that scales between the smallest and largest breakpoints.
Markup<p class="text-scalable-lg">Large text that scales between the smallest and largest breakpoints.</p>
More Text Classes
WebUI includes the most commonly used text classes, so that you can create text that is both readable and pleasing to the eye.
Text Styles
- text-italic
- text-bold
- text-upper
- text-lower
- text-capital
- text-underline
- text-line-through
- text-dropcap
Text Behaviour
<div class="container"> <div class="table-row background-secondary text-center text-sm"> <div class="table-col-5"> text </div> <div class="table-col-5"> text-normal </div> <div class="table-col-5"> text-wrap </div> <div class="table-col-5"> text-nowrap </div> </div> <div class="table-row"> <div class="table-col-5 text"> <div class="panel">Pneumonoultramicro-scopicsilico-volcanoconiosis</div> </div> <div class="table-col-5 text-normal"> <div class="panel">Pneumonoultramicro-scopicsilico-volcanoconiosis</div> </div> <div class="table-col-5 text-wrap"> <div class="panel">Pneumonoultramicro-scopicsilico-volcanoconiosis</div> </div> <div class="table-col-5 text-nowrap"> <div class="panel">Pneumonoultramicro-scopicsilico-volcanoconiosis</div> </div> </div> </div>
Text Direction
Example<div class="container"> <div class="table-row background-secondary text-center text-sm"> <div class="table-col-10"> text-direction-ltr </div> <div class="table-col-10"> text-direction-rtl </div> </div> <div class="table-row text-lg"> <div class="table-col-10"> <div class="panel height-lg text-direction-ltr"> Lorem ipsum dolor sit amet </div> </div> <div class="table-col-10"> <div class="panel height-lg text-direction-rtl"> Lorem ipsum dolor sit amet </div> </div> </div> </div>
Text OrientationNot supported in Internet Explorer
Example<div class="container"> <div class="table-row background-secondary text-center text-sm"> <div class="table-col-5"> text-vertical-ltr </div> <div class="table-col-5"> text-vertical-rtl </div> <div class="table-col-5"> text-sideways-ltr </div> <div class="table-col-5"> text-sideways-rtl </div> </div> <div class="table-row"> <div class="table-col-5"> <div class="panel height-lg text-vertical-ltr">Pellentesque habitant morbi tristique</div> </div> <div class="table-col-5"> <div class="panel height-lg text-vertical-rtl">Pellentesque habitant morbi tristique</div> </div> <div class="table-col-5"> <div class="panel height-lg text-sideways-slr">Pellentesque habitant morbi tristique</div> </div> <div class="table-col-5"> <div class="panel height-lg text-sideways-srl">Pellentesque habitant morbi tristique</div> </div> </div> </div>
Mixed OrientationNot supported in Internet Explorer
Example民國105年4月16日
平成20年4月16日に
<div class="container"> <div class="table-row background-secondary text-center text-sm"> <div class="table-col-10"> text-vertical-lr, text-upright </div> <div class="table-col-10"> text-vertical-ltr, text-upright-digits </div> </div> <div class="table-row text-lg"> <div class="table-col-10"> <div class="panel"> <p lang="zh-Hant" class="text-vertical-ltr"> 民國<span class="text-upright">105</span>年<span class="text-upright">4</span>月<span class="text-upright">16</span>日 </p> </div> </div> <div class="table-col-10"> <div class="panel"> <p lang="ja" class="text-vertical-ltr text-upright-digits">平成20年4月16日に</p> </div> </div> </div> </div>
Customisation
Blockquotes
ExampleMarkupBlockquote heading
Blockquotes look great with a little formatting and colour using WebUI classes.
— Blockquote footer
<blockquote class="boundary-left-accent-2 background-primary rounded-md"> <p class="color-accent-2">Blockquote heading</p> <p>Blockquotes look great with a little formatting and colour using WebUI classes.</p> <p class="text-sm text-italic color-accent-5">— Blockquote footer</p> </blockquote>