Skip to content

Commit

Permalink
Add .text-capitalize utility class (#2072)
Browse files Browse the repository at this point in the history
* Add .text-capitalize

* Add to doc

* Create four-dancers-dress.md

Co-authored-by: Jon Rohan <[email protected]>
  • Loading branch information
JasonEtco and jonrohan authored May 4, 2022
1 parent 13dd110 commit ab6f084
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/four-dancers-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": minor
---

Add `.text-capitalize` utility class
1 change: 1 addition & 0 deletions docs/content/utilities/typography.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ Change the font weight, styles, and alignment with these utilities.
<p class="lead">Bacon ipsum dolor amet tri-tip chicken kielbasa, cow swine beef corned beef ground round prosciutto hamburger porchetta sausage alcatra tail.</p>
<p class="text-mono">Monospace</p>
<p class="user-select-none">User Select None</p>
<p class="text-capitalize">capitalize</p>
```

## Word-break
Expand Down
5 changes: 5 additions & 0 deletions src/utilities/typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,8 @@
.user-select-none {
user-select: none !important;
}

/* Make text capitalized (transforms first character to uppercase) */
.text-capitalize {
text-transform: capitalize !important;
}

0 comments on commit ab6f084

Please sign in to comment.