Skip to content

Commit b74e78b

Browse files
authored
Rename SegmentedControl--iconOnly-whenNarrow to SegmentedControl-button--iconOnly-whenNarrow and place on button (#2202)
* Rename whenNarrow so it's a class on the button * Create silent-crews-pay.md
1 parent 2c0fec7 commit b74e78b

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.changeset/silent-crews-pay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/css": patch
3+
---
4+
5+
Rename SegmentedControl--iconOnly-whenNarrow to SegmentedControl-button--iconOnly-whenNarrow and place on button

src/segmented-control/segmented-control.scss

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,8 @@
135135

136136
// Icon only when narrow
137137
@media (max-width: $width-md) {
138-
.SegmentedControl--iconOnly-whenNarrow {
139-
.SegmentedControl-button {
140-
width: var(--primer-control-medium-size, 32px);
141-
}
138+
.SegmentedControl-button--iconOnly-whenNarrow {
139+
width: var(--primer-control-medium-size, 32px);
142140

143141
.SegmentedControl-content {
144142
padding: 0;
@@ -163,7 +161,7 @@
163161

164162
// reset for icon-only buttons
165163
.SegmentedControl-button--iconOnly,
166-
.SegmentedControl--iconOnly-whenNarrow .SegmentedControl-button {
164+
.SegmentedControl-button--iconOnly-whenNarrow {
167165
min-width: unset;
168166
}
169167
}

0 commit comments

Comments
 (0)