Skip to content

Commit 8f07e55

Browse files
authored
fix(form elements): colors (#5526)
* fix(form elements): colors * refactor: simplified CSS logic
1 parent 5917492 commit 8f07e55

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

.changeset/fluffy-balloons-peel.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@db-ux/core-components": patch
3+
"@db-ux/ngx-core-components": patch
4+
"@db-ux/react-core-components": patch
5+
"@db-ux/wc-core-components": patch
6+
"@db-ux/v-core-components": patch
7+
---
8+
9+
fix(form elements): `valid` background- and border-colors

packages/components/src/styles/internal/_form-components.scss

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ $db-min-inline-size: var(
101101

102102
@mixin set-floating-label-overwrites($selector) {
103103
&[data-variant="floating"] {
104-
@include get-validity($selector) {
104+
@include get-validity($selector, "valid") {
105105
label {
106-
color: var(--db-successful-on-bg-basic-emphasis-80-default);
106+
color: var(--db-successful-on-bg-basic-emphasis-90-default);
107107
}
108108
}
109109

110110
@include get-validity($selector, "invalid") {
111111
label {
112-
color: var(--db-critical-on-bg-basic-emphasis-80-default);
112+
color: var(--db-critical-on-bg-basic-emphasis-90-default);
113113
}
114114
}
115115

@@ -376,13 +376,8 @@ $input-valid-types:
376376

377377
@include set-floating-label-overwrites($selector);
378378

379-
@include get-validity($selector) {
380-
&:has(
381-
> .db-infotext[data-semantic="successful"],
382-
> db-infotext > .db-infotext[data-semantic="successful"]
383-
) {
384-
@include get-validity-color($selector, "valid");
385-
}
379+
@include get-validity($selector, "valid") {
380+
@include get-validity-color($selector, "valid");
386381
}
387382

388383
@include get-validity($selector, "invalid") {

0 commit comments

Comments
 (0)