Skip to content

Commit

Permalink
fix(input): text-color of disabled in safari
Browse files Browse the repository at this point in the history
  • Loading branch information
BeADre committed Sep 29, 2021
1 parent cfe2d7b commit dd33256
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/input/docs/en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ Here are the CSS variables used by the component, Styles can be customized using
| `--input-input-text-color` | `#555` |
| `--input-line-size` | `1px` |
| `--input-line-spread-size` | `2px` |
| `--input-disabled-color` | `#aaa` |
| `--input-disabled-color` | `var(--color-disabled)` |
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/input/docs/zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,4 @@ createApp().use(Icon)
| `--input-input-text-color` | `#555` |
| `--input-line-size` | `1px` |
| `--input-line-spread-size` | `2px` |
| `--input-disabled-color` | `#aaa` |
| `--input-disabled-color` | `var(--color-disabled)` |
4 changes: 3 additions & 1 deletion packages/varlet-ui/src/input/input.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@input-icon-size: 20px;
@input-line-size: 1px;
@input-line-spread-size: 2px;
@input-disabled-color: #aaa;
@input-disabled-color: var(--color-disabled);

:root {
--input-input-text-color: @input-input-text-color;
Expand Down Expand Up @@ -158,6 +158,8 @@
}

&--disabled {
-webkit-text-fill-color: var(--input-disabled-color);
opacity: 1;
color: var(--input-disabled-color);
}

Expand Down

0 comments on commit dd33256

Please sign in to comment.