Examples
Font size
Standard colors
Inverse colors
These colors are best used with the "inverse" background colors.
Link colors
Status and state text colors
Controlling text
Breakword
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut.
No Wrap
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula.
Wrap
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut.
Truncate
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut.
Documentation
Overview
These text utilities can be used to modify text within the PatternFly framework. In most cases, using the components with available modifiers should be sufficient to implement most designs, and should be preferred over customizations using these utilities.
Care should be taken especially when applying text colors, as this can have a negative effect on the readability and accessibility of text. Refer to the information on contrast ratios for more information.
Breakpoint is optional. Breakpoints: base (no breakpoint value), -on-sm
, -on-md
, -on-lg
, and -on-xl
. Example .pf-u-font-size-xl-on-lg
Usage
Class | Applied to | Outcome |
---|---|---|
.pf-u-font-size-{xs, sm, md, lg, xl, 2xl, 3xl, 4xl}{-on-[breakpoint]} | * | Sets font-size to xs, sm, md, lg, xl, 2xl, 3xl, or 4xl |
.pf-u-font-weight-{light, normal, bold}{-on-[breakpoint]} | * | Sets font-size to light, normal, or bold |
.pf-u-color-{100, 200, 300, 400}{-on-[breakpoint]} | * | Sets font-color to color 100, 200, 300, or 400 |
.pf-u-active-color-{100, 400}{-on-[breakpoint]} | * | Sets font-color to active color 100 or 400 |
.pf-u-primary-color-100{-on-[breakpoint]} | * | Sets font-color to primary color 100 |
.pf-u-color-light-{100, 200}{-on-[breakpoint]} | * | Sets font-color to light color 100 or 200 |
.pf-u-link-color{-on-[breakpoint]} | * | Sets font-color to link color |
.pf-u-link-color-hover{-on-[breakpoint]} | * | Sets font-color to hover link color |
.pf-u-link-color-light{-on-[breakpoint]} | * | Sets font-color to light link color |
.pf-u-link-color-light-hover{-on-[breakpoint]} | * | Sets font-color to light hover link color |
.pf-u-link-color-dark{-on-[breakpoint]} | * | Sets font-color to dark link color |
.pf-u-link-color-dark-hover{-on-[breakpoint]} | * | Sets font-color to dark hover link color |
.pf-u-link-color-visited{-on-[breakpoint]} | * | Sets font-color to visited link color |
.pf-u-default-color-{100, 200, 300}{-on-[breakpoint]} | * | Sets font-color to default color 100, 200, or 300 |
.pf-u-success-color-{100, 200}{-on-[breakpoint]} | * | Sets font-color to success color 100 or 200 |
.pf-u-info-color-{100, 200}{-on-[breakpoint]} | * | Sets font-color to info color 100 or 200 |
.pf-u-warning-color-{100, 200}{-on-[breakpoint]} | * | Sets font-color to warning color 100 or 200 |
.pf-u-danger-color-{100, 200, 300}{-on-[breakpoint]} | * | Sets font-color to danger color 100, 200, or 300 |
.pf-u-disabled-color-{100, 200}{-on-[breakpoint]} | * | Sets font-color to disabled color 100 or 200 |
.pf-u-icon-color-{light, dark}{-on-[breakpoint]} | * | Sets font-color to light or dark icon color |
.pf-u-text-break-word{-on-[breakpoint]} | * | Sets word-break to break-word |
.pf-u-text-nowrap{-on-[breakpoint]} | * | Sets white-space to nowrap |
.pf-u-text-wrap{-on-[breakpoint]} | * | Sets white-space to normal |
.pf-u-text-truncate | * | Truncates text field |
View source on GitHub