Text colour
color property. It controls the colour of text. | CSS Shortcut class | Applied style |
|---|---|
| |
| |
| |
| |
| |
Examples
Primary
text-primary
This text uses the default Government of Canada text colour.
<p class="text-primary">
This text uses the default Government of Canada text
colour.
</p> Secondary
text-secondary
This text uses the secondary text colour.
<p class="text-secondary">
This text uses the secondary text colour.
</p> Current
text-current
This text’s colour is based on the current colour property.
<div class="bg-primary text-light">
<p class="text-current">
This text’s colour is based on the current colour
property.
</p>
</div> Light
text-light
This is the light text colour.
<p class="text-light">This is the light text colour.</p> Transparent
text-transparent
This text is invisible, but still accessible to screenreaders.
<p class="text-transparent">
This text is invisible, but still accessible to
screenreaders.
</p> xs:> 480pxsm:> 640pxmd:> 768pxlg:> 1024pxxl:> 1280px
<div class="xs:text-secondary ...">
...
</div> hoverfocus
<div class="hover:text-secondary ...">
...
</div>