Skip to content

Commit efe8613

Browse files
committed
refactor(css): add --h20 modifier to dc__toggle-square-toggle
to remove duplication of css
1 parent bc8857b commit efe8613

File tree

1 file changed

+12
-24
lines changed

1 file changed

+12
-24
lines changed

src/Common/Toggle/Toggle.scss

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -119,32 +119,20 @@ input:focus + .toggle__slider {
119119
background-color: var(--N0);
120120
}
121121
}
122-
}
123-
124-
.dc__toggle-square-toggle--h20 {
125-
.toggle__slider {
126-
border-color: var(--color);
127-
background-color: var(--color) !important;
128122

129-
&:before {
130-
background-color: transparent;
131-
}
132-
133-
&.with-icon svg {
134-
height: 18px;
135-
width: 18px;
136-
margin-top: 1px;
137-
background-color: var(--N0);
138-
left: 0;
139-
padding: 2px;
140-
border-radius: 3px;
123+
&--h20 {
124+
.toggle__slider {
125+
&.with-icon svg {
126+
height: 18px;
127+
width: 18px;
128+
padding: 2px;
129+
}
141130
}
142-
}
143-
144-
input:checked + .toggle__slider {
145-
&.with-icon svg {
146-
left: -10px;
147-
background-color: var(--N0);
131+
132+
input:checked + .toggle__slider {
133+
&.with-icon svg {
134+
left: -10px;
135+
}
148136
}
149137
}
150138
}

0 commit comments

Comments
 (0)