Created
May 12, 2024 19:14
-
-
Save jfmdev/855d8b20823c89fc8f196812b2d3eb39 to your computer and use it in GitHub Desktop.
Utility classes for text styling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* --- Text transform --- */ | |
.text-uppercase { | |
text-transform: uppercase; | |
} | |
.text-lowercase { | |
text-transform: lowercase; | |
} | |
.text-capitalize { | |
text-transform: capitalize; | |
} | |
.text-normal-case { | |
text-transform: none; | |
} | |
/* --- Text decoration --- */ | |
.text-underline { | |
text-decoration-line: underline; | |
} | |
.text-overline { | |
text-decoration-line: overline; | |
} | |
.text-line-through { | |
text-decoration-line: line-through; | |
} | |
.text-no-decoration { | |
text-decoration-line: none; | |
} | |
/* --- Text alignment --- */ | |
.text-left { | |
text-align: left; | |
} | |
.text-center { | |
text-align: center; | |
} | |
.text-right { | |
text-align: right; | |
} | |
.text-justify { | |
text-align: justify; | |
} | |
.text-start { | |
text-align: start; | |
} | |
.text-end { | |
text-align: end; | |
} | |
/* --- Text wrap --- */ | |
.text-wrap { | |
text-wrap: wrap; | |
} | |
.text-nowrap { | |
text-wrap: nowrap; | |
} | |
.text-balance { | |
text-wrap: balance; | |
} | |
.text-pretty { | |
text-wrap: pretty; | |
} | |
/* --- Text break --- */ | |
.text-break-normal { | |
overflow-wrap: normal; | |
word-break: normal; | |
} | |
.text-break-words { | |
overflow-wrap: break-word; | |
} | |
.text-break-all { | |
word-break: break-all; | |
} | |
.text-break-keep { | |
word-break: keep-all; | |
} | |
/* --- Text overflow --- */ | |
.text-truncate { | |
overflow: hidden; | |
text-overflow: ellipsis; | |
white-space: nowrap; | |
} | |
.text-ellipsis { | |
text-overflow: ellipsis; | |
} | |
.text-clip { | |
text-overflow: clip; | |
} | |
/* --- Font weight --- */ | |
.font-thin { | |
font-weight: 100; | |
} | |
.font-extralight { | |
font-weight: 200; | |
} | |
.font-light { | |
font-weight: 300; | |
} | |
.font-normal { | |
font-weight: 400; | |
} | |
.font-medium { | |
font-weight: 500; | |
} | |
.font-semibold { | |
font-weight: 600; | |
} | |
.font-bold { | |
font-weight: 700; | |
} | |
.font-extrabold { | |
font-weight: 800; | |
} | |
.font-black { | |
font-weight: 900; | |
} | |
/* --- Font style --- */ | |
.font-italic { | |
font-style: italic; | |
} | |
.font-not-italic { | |
font-style: normal; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment