Skip to content

Commit

Permalink
fix: tk-network (#2117)
Browse files Browse the repository at this point in the history
* fix: do not show placeholder if readonly

* fix: chrome background color on dark mode autocomplete

* fix: switch hcm

* fix: readonly hcm border
  • Loading branch information
felix-ico authored Sep 6, 2023
1 parent fa502cf commit 3747093
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
9 changes: 9 additions & 0 deletions packages/components/src/components/switch/switch.css
Original file line number Diff line number Diff line change
Expand Up @@ -301,3 +301,12 @@ scale-switch scale-icon-action-success {
[data-platform='android'] .switch--disabled .switch__thumb {
color: var(--telekom-color-ui-strong);
}

@media screen and (forced-colors: active), (-ms-high-contrast: active) {
.switch__toggle {
border: 1px solid;
}
scale-icon-action-checkmark {
visibility: hidden !important;
}
}
14 changes: 14 additions & 0 deletions packages/components/src/components/text-field/text-field.css
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,17 @@ input[type='month']::-webkit-calendar-picker-indicator {
position: absolute;
right: 12px;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
color-scheme: dark;
}

@media screen and (forced-colors: active), (-ms-high-contrast: active) {
.text-field--readonly input,
.text-field--readonly .text-field__control {
border: 1px solid;
}
}
4 changes: 3 additions & 1 deletion packages/components/src/components/text-field/text-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ export class TextField {
onFocus={this.handleFocus}
onBlur={this.handleBlur}
onKeyDown={this.handleKeyDown}
{...(!!this.placeholder ? { placeholder: this.placeholder } : {})}
{...(!!this.placeholder && !this.readonly
? { placeholder: this.placeholder }
: {})}
disabled={this.disabled}
readonly={this.readonly}
autocomplete={this.inputAutocomplete}
Expand Down

0 comments on commit 3747093

Please sign in to comment.