Skip to content

Commit

Permalink
Prevent SegmentedControl-text from wrapping (#2174)
Browse files Browse the repository at this point in the history
* Prevent SegmentedControl-text from wrapping

* Create poor-dots-play.md

Co-authored-by: Katie Langerman <[email protected]>
  • Loading branch information
simurai and langermank authored Jul 28, 2022
1 parent add769c commit 97f178d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/poor-dots-play.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": patch
---

Prevent `SegmentedControl-text` from wrapping
2 changes: 2 additions & 0 deletions src/segmented-control/segmented-control.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@
// Text -----------------------------------------

.SegmentedControl-text {
white-space: nowrap;

// renders a visibly hidden "copy" of the text in bold, reserving box space for when text becomes bold on selected
&[data-content]::before {
display: block;
Expand Down

0 comments on commit 97f178d

Please sign in to comment.