We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f740d00 commit 33f799fCopy full SHA for 33f799f
.changeset/dirty-mails-stare.md
@@ -0,0 +1,5 @@
1
+---
2
+"@primer/css": patch
3
4
+
5
+Add missing ToggleSwitch--checked styles
src/toggle-switch/toggle-switch.scss
@@ -1,3 +1,9 @@
+// Catalyst in dotcom applies a display: block to all web component elements. This
+// rule overrides it so the status label and toggle switch are laid out correctly.
+.ToggleSwitch.ToggleSwitch {
+ display: inline-flex;
+}
6
7
.ToggleSwitch {
8
align-items: center;
9
display: inline-flex;
@@ -16,6 +22,18 @@
16
22
}
17
23
18
24
25
+.ToggleSwitch--checked {
26
+ .ToggleSwitch-statusOn {
27
+ height: auto;
28
+ visibility: visible;
29
+ }
30
31
+ .ToggleSwitch-statusOff {
32
+ height: 0;
33
+ visibility: hidden;
34
35
36
19
37
.ToggleSwitch-track {
20
38
position: relative;
21
39
display: block;
0 commit comments