Skip to content

Commit 2f78f4e

Browse files
authored
fix(form): inverted state forms colors
The state colors in inverted form and inverted message were too dark for field label and message text I adjusted them so they now match a error field input label to make it readable and consistent
1 parent 245b087 commit 2f78f4e

File tree

4 files changed

+28
-4
lines changed

4 files changed

+28
-4
lines changed

src/definitions/collections/form.less

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,13 @@
686686
.ui.form .field.@{state} .checkbox .box:after {
687687
color: @c;
688688
}
689+
690+
& when (@variationFormInverted) {
691+
.ui.inverted.form .fields.@{state} .field label,
692+
.ui.inverted.form .@{state}.field label {
693+
color: @lbg;
694+
}
695+
}
689696
})
690697
}
691698

src/definitions/collections/message.less

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,41 +296,47 @@
296296
boxShadow : @positiveBoxShadow;
297297
boxFloatShadow : @positiveBoxFloatingShadow;
298298
text : @positiveTextColor;
299+
invertedText : @positiveBorderColor;
299300
};
300301
@negative: {
301302
background : @negativeBackgroundColor;
302303
header : @negativeHeaderColor;
303304
boxShadow : @negativeBoxShadow;
304305
boxFloatShadow : @negativeBoxFloatingShadow;
305306
text : @negativeTextColor;
307+
invertedText : @negativeBorderColor;
306308
};
307309
@info: {
308310
background : @infoBackgroundColor;
309311
header : @infoHeaderColor;
310312
boxShadow : @infoBoxShadow;
311313
boxFloatShadow : @infoBoxFloatingShadow;
312314
text : @infoTextColor;
315+
invertedText : @formInfoLabelBackground;
313316
};
314317
@warning: {
315318
background : @warningBackgroundColor;
316319
header : @warningHeaderColor;
317320
boxShadow : @warningBoxShadow;
318321
boxFloatShadow : @warningBoxFloatingShadow;
319322
text : @warningTextColor;
323+
invertedText : @formWarningLabelBackground;
320324
};
321325
@error: {
322326
background : @errorBackgroundColor;
323327
header : @errorHeaderColor;
324328
boxShadow : @errorBoxShadow;
325329
boxFloatShadow : @errorBoxFloatingShadow;
326330
text : @errorTextColor;
331+
invertedText : @formErrorLabelBackground;
327332
};
328333
@success: {
329334
background : @successBackgroundColor;
330335
header : @successHeaderColor;
331336
boxShadow : @successBoxShadow;
332337
boxFloatShadow : @successBoxFloatingShadow;
333338
text : @successTextColor;
339+
invertedText : @formSuccessLabelBackground;
334340
};
335341
}
336342

@@ -343,6 +349,7 @@
343349
@bs: @consequences[@@color][boxShadow];
344350
@bfs: @consequences[@@color][boxFloatShadow];
345351
@t: @consequences[@@color][text];
352+
@it: @consequences[@@color][invertedText];
346353

347354
.ui.@{color}.message {
348355
background-color: @bg;
@@ -361,6 +368,12 @@
361368
.ui.@{color}.message .header {
362369
color: @hd;
363370
}
371+
& when (@variationMessageInverted) {
372+
.ui.inverted.@{color}.message,
373+
.ui.inverted.@{color}.message .header {
374+
color: @it;
375+
}
376+
}
364377
})
365378
}
366379

src/themes/default/globals/colors.less

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@
497497
borderRadius: @inputErrorBorderRadius;
498498
boxShadow: @inputErrorBoxShadow;
499499
cornerLabelColor: @white;
500-
labelBackground: darken(@formErrorBorder, -8);
500+
labelBackground: @formErrorLabelBackground;
501501

502502
dropdownLabelColor: @dropdownErrorLabelColor;
503503
dropdownLabelBackground: @dropdownErrorLabelBackground;
@@ -525,7 +525,7 @@
525525
borderRadius: @inputInfoBorderRadius;
526526
boxShadow: @inputInfoBoxShadow;
527527
cornerLabelColor: @white;
528-
labelBackground: darken(@formInfoBorder, -8);
528+
labelBackground: @formInfoLabelBackground;
529529

530530
dropdownLabelColor: @dropdownInfoLabelColor;
531531
dropdownLabelBackground: @dropdownInfoLabelBackground;
@@ -553,7 +553,7 @@
553553
borderRadius: @inputSuccessBorderRadius;
554554
boxShadow: @inputSuccessBoxShadow;
555555
cornerLabelColor: @white;
556-
labelBackground: darken(@formSuccessBorder, -8);
556+
labelBackground: @formSuccessLabelBackground;
557557

558558
dropdownLabelColor: @dropdownSuccessLabelColor;
559559
dropdownLabelBackground: @dropdownSuccessLabelBackground;
@@ -581,7 +581,7 @@
581581
borderRadius: @inputWarningBorderRadius;
582582
boxShadow: @inputWarningBoxShadow;
583583
cornerLabelColor: @white;
584-
labelBackground: darken(@formWarningBorder, -8);
584+
labelBackground: @formWarningLabelBackground;
585585

586586
dropdownLabelColor: @dropdownWarningLabelColor;
587587
dropdownLabelBackground: @dropdownWarningLabelBackground;

src/themes/default/globals/site.variables

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,24 +1346,28 @@
13461346
@formErrorColor: @negativeTextColor;
13471347
@formErrorBorder: @negativeBorderColor;
13481348
@formErrorBackground: @negativeBackgroundColor;
1349+
@formErrorLabelBackground: darken(@formErrorBorder, -8);
13491350
@transparentFormErrorColor: @formErrorColor;
13501351
@transparentFormErrorBackground: @formErrorBackground;
13511352

13521353
@formInfoColor: @infoTextColor;
13531354
@formInfoBorder: @infoBorderColor;
13541355
@formInfoBackground: @infoBackgroundColor;
1356+
@formInfoLabelBackground: darken(@formInfoBorder, -8);
13551357
@transparentFormInfoColor: @formInfoColor;
13561358
@transparentFormInfoBackground: @formInfoBackground;
13571359

13581360
@formSuccessColor: @positiveTextColor;
13591361
@formSuccessBorder: @positiveBorderColor;
13601362
@formSuccessBackground: @positiveBackgroundColor;
1363+
@formSuccessLabelBackground: darken(@formSuccessBorder, -8);
13611364
@transparentFormSuccessColor: @formSuccessColor;
13621365
@transparentFormSuccessBackground: @formSuccessBackground;
13631366

13641367
@formWarningColor: @warningTextColor;
13651368
@formWarningBorder: @warningBorderColor;
13661369
@formWarningBackground: @warningBackgroundColor;
1370+
@formWarningLabelBackground: darken(@formWarningBorder, -8);
13671371
@transparentFormWarningColor: @formWarningColor;
13681372
@transparentFormWarningBackground: @formWarningBackground;
13691373

0 commit comments

Comments
 (0)