Skip to content

Commit 2a02263

Browse files
michaelmkrausmfranzkegithub-actions[bot]
authored
fix: set border- and label-color for in/valid state of select, textarea, custom select and input (#4258)
* feat: set border- and label-color for in/valid state of textarea, custom select and input * test: updated snapshots * test: updated snapshots * test: updated snapshots * fix(): set validity color for textarea border * test: updated snapshots * feat(): set border- and label-color for valid and invalid textarea and input * feat(): revert override in package * feat(): set border color for valid and invalid state * auto update snapshots (#4990) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat(): replace textarea-specific block with the existing variable that holds input and textarea * auto update snapshots (#4999) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat(): change color of label and border to correct value * auto update snapshots (#5000) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore(): add changeset * chore(): fix screenshots * auto update snapshots (#5177) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore(): remove redundant textarea block * feat(): only color in/valid floating labels * chore(): remove unused import * Update four-carrots-flow.md * Update border color for form elements based on state --------- Co-authored-by: Maximilian Franzke <[email protected]> Co-authored-by: Maximilian Franzke <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent e4bc905 commit 2a02263

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.changeset/four-carrots-flow.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/v-core-components": patch
6+
"@db-ux/wc-core-components": patch
7+
---
8+
9+
Set border of select, textarea, custom select and input to corresponding color when in/valid state is set.

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,18 @@ $db-min-inline-size: var(
8888

8989
@mixin set-floating-label-overwrites($selector) {
9090
&[data-variant="floating"] {
91+
@include get-validity($selector) {
92+
label {
93+
color: var(--db-successful-on-bg-basic-emphasis-80-default);
94+
}
95+
}
96+
97+
@include get-validity($selector, "invalid") {
98+
label {
99+
color: var(--db-critical-on-bg-basic-emphasis-80-default);
100+
}
101+
}
102+
91103
> label {
92104
@extend %db-overwrite-font-size-md;
93105

0 commit comments

Comments
 (0)