Skip to content

Commit 2265218

Browse files
author
Daniel Tsanev
committed
fix: increase specificity
1 parent 750e11a commit 2265218

File tree

3 files changed

+21
-31
lines changed

3 files changed

+21
-31
lines changed

projects/angular/src/forms/styles/_checkbox.clarity.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@
128128
}
129129

130130
.clr-form-compact .clr-checkbox-wrapper {
131-
@include forms-mixins.form-flatten-compact-adjustments();
132131
@include forms-mixins.form-inline-input();
133132
height: calc(#{forms-variables.$clr-forms-baseline} * 4);
134133

projects/angular/src/forms/styles/_containers.clarity.scss

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -157,20 +157,17 @@
157157
}
158158
}
159159

160-
.clr-form-compact {
160+
.clr-form.clr-form-compact {
161161
.clr-form-control > .clr-control-label {
162162
width: calc(32 * #{forms-variables.$clr-forms-baseline});
163163
min-width: calc(32 * #{forms-variables.$clr-forms-baseline});
164+
margin-top: tokens.$cds-global-space-3;
164165
}
165166
.clr-form-control.clr-row > .clr-control-label {
166167
width: auto;
167168
min-width: auto;
168169
}
169170

170-
.clr-control-label {
171-
margin-top: tokens.$cds-global-space-3;
172-
}
173-
174171
.clr-form-control {
175172
display: flex;
176173
flex-direction: row;
@@ -179,36 +176,31 @@
179176

180177
.clr-control-container {
181178
display: flex;
182-
}
183179

184-
.clr-subtext {
185-
display: inline-block;
186-
187-
// special margin left based on --clr-forms-icon-size
188-
// to align subtexts when error/success icon is missing.
189-
margin-left: forms-variables.$clr-forms-icon-size;
190-
}
191-
192-
.clr-error,
193-
.clr-success {
194180
.clr-subtext {
195-
margin-left: tokens.$cds-global-space-3;
181+
display: inline-block;
182+
}
183+
.clr-subtext-wrapper {
184+
flex-basis: auto;
185+
display: inline-block;
186+
}
196187

197-
&.error,
198-
&.success {
199-
margin-left: tokens.$cds-global-space-4;
188+
&.clr-error,
189+
&.clr-success {
190+
.clr-subtext {
191+
margin-left: tokens.$cds-global-space-3;
192+
193+
&.error,
194+
&.success {
195+
margin-left: tokens.$cds-global-space-4;
196+
}
200197
}
201-
}
202198

203-
// Center the validation icon
204-
.clr-validate-icon {
205-
margin-left: 0;
199+
// Center the validation icon
200+
.clr-validate-icon {
201+
margin-left: 0;
202+
}
206203
}
207204
}
208-
209-
.clr-subtext-wrapper {
210-
flex-basis: auto;
211-
display: inline-block;
212-
}
213205
}
214206
}

projects/angular/src/forms/styles/_radio.clarity.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
}
8686

8787
.clr-form-compact .clr-radio-wrapper {
88-
@include forms-mixins.form-flatten-compact-adjustments();
8988
@include forms-mixins.form-inline-input();
9089
height: calc(4 * #{forms-variables.$clr-forms-baseline});
9190

0 commit comments

Comments
 (0)