Skip to content

Commit

Permalink
fix: align input text colors (#837)
Browse files Browse the repository at this point in the history
* fix(toggle): update label color

* chore: test screenshots update

---------

Co-authored-by: theJohnnyMe <nikola.johnny.mirkovic@scania.com>
  • Loading branch information
nathalielindqvist and theJohnnyMe authored Nov 12, 2024
1 parent c8fc3b4 commit 64121e1
Show file tree
Hide file tree
Showing 27 changed files with 41 additions and 45 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/components/dropdown/dropdown-filter.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
display: flex;
width: 100%;
height: 100%;

input {
color: var(--tds-dropdown-filter-input-color);
}
}

.label-inside-as-placeholder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
--tds-dropdown-option-border: var(--tds-grey-300);
--tds-dropdown-label-color: var(--tds-grey-958);
--tds-dropdown-helper-color: var(--tds-grey-700);
--tds-dropdown-placeholder-color: var(--tds-grey-700);
--tds-dropdown-placeholder-color: var(--tds-grey-500);

.tds-mode-variant-primary {
--tds-dropdown-option-background: var(--tds-grey-50);
Expand All @@ -28,9 +28,9 @@
--tds-dropdown-option-background-hover: var(--tds-grey-800);
--tds-dropdown-option-background-selected: var(--tds-grey-700);
--tds-dropdown-option-border: var(--tds-grey-800);
--tds-dropdown-label-color: var(--tds-grey-400);
--tds-dropdown-label-color: var(--tds-grey-50);
--tds-dropdown-helper-color: var(--tds-grey-500);
--tds-dropdown-placeholder-color: var(--tds-grey-400);
--tds-dropdown-placeholder-color: var(--tds-grey-600);

.tds-mode-variant-primary {
--tds-dropdown-option-background: var(--tds-grey-868);
Expand Down
28 changes: 17 additions & 11 deletions packages/core/src/components/dropdown/dropdown-vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@
--tds-dropdown-border-bottom: var(--tds-grey-600);
--tds-dropdown-border-bottom-hover: var(--tds-grey-800);
--tds-dropdown-border-bottom-open: var(--tds-blue-400);
--tds-dropdown-value-color: var(--tds-grey-868);
--tds-dropdown-value-color: var(--tds-grey-958);
--tds-dropdown-label-color: var(--tds-grey-958);
--tds-dropdown-label-inside-color: var(--tds-grey-700);
--tds-dropdown-label-inside-color: var(--tds-grey-958);
--tds-dropdown-helper-color: var(--tds-grey-700);
--tds-dropdown-placeholder-color: var(--tds-grey-700);
--tds-dropdown-placeholder-color: var(--tds-grey-500);
--tds-dropdown-disabled-color: var(--tds-grey-400);
--tds-dropdown-filter-input-color: var(--tds-grey-958);
--tds-dropdown-border-radius: var(--tds-spacing-element-4) var(--tds-spacing-element-4) 0 0;
--tds-dropdown-list-border-radius-down: 0 0 var(--tds-spacing-element-4) var(--tds-spacing-element-4);
--tds-dropdown-list-border-radius-up: var(--tds-spacing-element-4) var(--tds-spacing-element-4) 0 0;
--tds-dropdown-list-border-radius-down: 0 0 var(--tds-spacing-element-4)
var(--tds-spacing-element-4);
--tds-dropdown-list-border-radius-up: var(--tds-spacing-element-4) var(--tds-spacing-element-4) 0
0;

.tds-mode-variant-primary {
--tds-dropdown-bg: var(--tds-grey-50);
Expand All @@ -39,14 +42,17 @@
--tds-dropdown-border-bottom: var(--tds-grey-600);
--tds-dropdown-border-bottom-hover: var(--tds-grey-400);
--tds-dropdown-border-bottom-open: var(--tds-blue-400);
--tds-dropdown-value-color: var(--tds-white);
--tds-dropdown-label-color: var(--tds-grey-400);
--tds-dropdown-label-inside-color: var(--tds-grey-400);
--tds-dropdown-value-color: var(--tds-grey-50);
--tds-dropdown-label-color: var(--tds-grey-50);
--tds-dropdown-label-inside-color: var(--tds-grey-50);
--tds-dropdown-helper-color: var(--tds-grey-500);
--tds-dropdown-placeholder-color: var(--tds-grey-400);
--tds-dropdown-placeholder-color: var(--tds-grey-600);
--tds-dropdown-disabled-color: var(--tds-grey-800);
--tds-dropdown-list-border-radius-down: 0 0 var(--tds-spacing-element-4) var(--tds-spacing-element-4);
--tds-dropdown-list-border-radius-up: var(--tds-spacing-element-4) var(--tds-spacing-element-4) 0 0;
--tds-dropdown-list-border-radius-down: 0 0 var(--tds-spacing-element-4)
var(--tds-spacing-element-4);
--tds-dropdown-list-border-radius-up: var(--tds-spacing-element-4) var(--tds-spacing-element-4) 0
0;
--tds-dropdown-filter-input-color: var(--tds-grey-50);

.tds-mode-variant-primary {
--tds-dropdown-bg: var(--tds-grey-868);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 6 additions & 8 deletions packages/core/src/components/text-field/text-field-vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
--tds-text-field-background: var(--tds-text-field-background-primary);
--tds-text-field-color: var(--tds-grey-600);
--tds-text-field-placeholder: var(--tds-grey-500);
--tds-text-field-data-color: var(--tds-grey-868);
--tds-text-field-data-color: var(--tds-grey-958);

//Disabled
--tds-text-field-background-disabled-primary: var(--tds-grey-50);
Expand All @@ -17,9 +17,8 @@
--tds-text-field-ps-color-disabled: var(--tds-grey-400);

//Label
--tds-text-field-label-color: var(--tds-grey-700);
--tds-text-field-label-inside-color: var(--tds-grey-700);
--tds-text-field-placeholder-focus-color: var(--tds-grey-500);
--tds-text-field-label-color: var(--tds-grey-958);
--tds-text-field-label-inside-color: var(--tds-grey-958);

//Highlight bar
--tds-text-field-bar: var(--tds-blue-400);
Expand Down Expand Up @@ -70,7 +69,7 @@
--tds-text-field-background-secondary: var(--tds-grey-868);
--tds-text-field-color: var(--tds-grey-600);
--tds-text-field-placeholder: var(--tds-grey-600);
--tds-text-field-data-color: var(--tds-grey-100);
--tds-text-field-data-color: var(--tds-grey-50);

//Disabled
--tds-text-field-ps-color-disabled: var(--tds-grey-700);
Expand All @@ -82,9 +81,8 @@
--tds-text-field-label-disabled: var(--tds-grey-700);

// Label
--tds-text-field-label-color: var(--tds-grey-100);
--tds-text-field-label-inside-color: var(--tds-grey-700);
--tds-text-field-placeholder-focus-color: var(--tds-grey-700);
--tds-text-field-label-color: var(--tds-grey-50);
--tds-text-field-label-inside-color: var(--tds-grey-50);

//Highlight bar
--tds-text-field-bar: var(--tds-blue-400);
Expand Down
8 changes: 2 additions & 6 deletions packages/core/src/components/text-field/text-field.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
background-color: var(--tds-text-field-background);

&::placeholder {
color: var(--tds-text-field-color);
}

&:focus::placeholder {
color: var(--tds-text-field-placeholder-focus-color);
color: var(--tds-text-field-placeholder);
}

&:disabled {
Expand Down Expand Up @@ -123,7 +119,7 @@
//Input field in focus
&:focus::placeholder {
transition: color 0.35s ease;
color: var(--tds-text-field-placeholder-focus-color);
color: var(--tds-text-field-placeholder);
}
}

Expand Down
18 changes: 7 additions & 11 deletions packages/core/src/components/textarea/textarea-vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
--tds-textarea-background-primary: var(--tds-grey-50);
--tds-textarea-background-secondary: var(--tds-white);
--tds-textarea-background: var(--tds-textarea-background-primary);
--tds-textarea-color: var(--tds-grey-868);
--tds-textarea-placeholder: var(--tds-grey-500);
--tds-textarea-placeholder-focus-color: var(--tds-grey-500);
--tds-textarea-color: var(--tds-grey-958);

// Disabled
--tds-textarea-disabled-color: var(--tds-grey-400);
Expand All @@ -17,10 +15,10 @@

// Label
--tds-textarea-label-color: var(--tds-grey-958);
--tds-textarea-label-inside-color: var(--tds-grey-700);
--tds-textarea-label-inside-color: var(--tds-grey-958);

// Placeholder
--tds-textarea-placeholder-focus-color: var(--tds-grey-500);
--tds-textarea-placeholder: var(--tds-grey-500);

// Helper
--tds-textarea-helper: var(--tds-grey-700);
Expand Down Expand Up @@ -62,9 +60,7 @@
--tds-textarea-background-primary: var(--tds-grey-900);
--tds-textarea-background-secondary: var(--tds-grey-868);
--tds-textarea-background: var(--tds-textarea-background-primary);
--tds-textarea-color: var(--tds-grey-200);
--tds-textarea-placeholder: var(--tds-grey-600);
--tds-textarea-placeholder-focus-color: var(--tds-grey-700);
--tds-textarea-color: var(--tds-grey-50);

// Disabled
--tds-textarea-disabled-color: var(--tds-grey-800);
Expand All @@ -75,11 +71,11 @@
--tds-textarea-disabled-label: var(--tds-grey-700);

// Label
--tds-textarea-label-color: var(--tds-grey-100);
--tds-textarea-label-inside-color: var(--tds-grey-400);
--tds-textarea-label-color: var(--tds-grey-50);
--tds-textarea-label-inside-color: var(--tds-grey-50);

// Placeholder
--tds-textarea-placeholder-focus-color: var(--tds-grey-700);
--tds-textarea-placeholder: var(--tds-grey-600);

// Helper
--tds-textarea-helper: var(--tds-grey-600);
Expand Down
6 changes: 1 addition & 5 deletions packages/core/src/components/textarea/textarea.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
color: var(--tds-textarea-placeholder);
}

&:focus::placeholder {
color: var(--tds-textarea-placeholder-focus-color);
}

&:disabled {
background-color: var(--tds-textarea-disabled-background);
color: var(--tds-textarea-disabled-color);
Expand Down Expand Up @@ -45,7 +41,7 @@
//Input field in focus
&:focus::placeholder {
transition: color 0.35s ease;
color: var(--tds-textarea-placeholder-focus-color);
color: var(--tds-textarea-placeholder);
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/toggle/toggle-vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
--tds-toggle-on-border-focus: var(--tds-positive);
--tds-toggle-on-slider-disabled: var(--tds-grey-800);
--tds-toggle-slider-disabled: var(--tds-grey-400);
--tds-toggle-label-color: var(--tds-white);
--tds-toggle-label-color: var(--tds-grey-50);
--tds-toggle-label-color-disabled: var(--tds-grey-400);
--tds-toggle-off-slider: var(--tds-grey-500);
--tds-toggle-off-slider-hover: var(--tds-grey-600);
Expand Down

0 comments on commit 64121e1

Please sign in to comment.