-
Notifications
You must be signed in to change notification settings - Fork 1
Justification
Default justification is left, but Paper allows for the full range of justifications: left, right, center and justified.
Justification applies only to text, so it makes sense to apply it to text-based tags. It is also inherited, so you can apply it to any tag in order to propagate a specific justification to all text that is contained in that tag, regardless of its depth in the DOM tree. Overriding a value is simply a matter of specifying a different justification style.
Justification is considered a specialization (see Basic concepts - Specialization), so it is handled through classes.
-
Left justification is applied using the
leftclass.<p class="left">This is a left-aligned paragraph</p>
-
Right justification is applied using the
rightclass.<p class="right">This is a right-aligned paragraph</p>
-
Center justification is applied using the
centerclass.<p class="center">This is a center-aligned paragraph</p>
-
Justified style is applied using the
justifyclass.<p class="justify">This is a justified paragraph</p>
Inheritance allows to propagate a justification style to all children.
<p>This is a standard paragraph, by default it is left-aligned</p>
<div class="justify">
<p>This paragraph is justified through inheritance</p>
<p class="left">This is a left-aligned paragraph</p>
</div>In this example all text in the page is right-aligned, unless overridden.
<body class="right">
<p>This paragraph is right-aligned through inheritance</p>
</body>