Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Improve disabled textarea contrast in darkmode #2055

Merged
merged 1 commit into from
Apr 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-darkmode-disabled-textarea
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Disabled textarea color contrast in darkmode

We fixed an issue that made text on disabled textarea fields unreadable since it was the same color as the background.

https://github.com/owncloud/owncloud-design-system/pull/2055
https://github.com/owncloud/owncloud-design-system/issues/2053
4 changes: 4 additions & 0 deletions src/components/atoms/OcTextarea/OcTextarea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ export default {
width: 100%;
-webkit-appearance: none;

&:disabled {
color: var(--oc-color-input-text-muted);
}

&:focus {
background-color: var(--oc-color-input-bg);
border-color: var(--oc-color-input-text-default);
Expand Down
9 changes: 5 additions & 4 deletions src/styles/theme/oc-form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ $internal-form-checkbox-indeterminate-image: "data:image/svg+xml;charset=UTF-8,%
border: 1px solid var(--oc-color-input-border);
border-radius: 0;
box-sizing: border-box;
color: var(--oc-color-input-text-default) ;
color: var(--oc-color-input-text-default);
display: inline-block;
height: 2rem;
line-height: inherit;
Expand All @@ -264,7 +264,9 @@ $internal-form-checkbox-indeterminate-image: "data:image/svg+xml;charset=UTF-8,%

/* 2 */
.oc-input:not(input),
.oc-select:not(select) { line-height: $form-line-height; }
.oc-select:not(select) {
line-height: $form-line-height;
}

/*
* Multi-line
Expand All @@ -287,8 +289,7 @@ $internal-form-checkbox-indeterminate-image: "data:image/svg+xml;charset=UTF-8,%

/* Disabled */
.oc-input:disabled,
.oc-select:disabled,
.oc-textarea:disabled {
.oc-select:disabled {
background-color: $form-disabled-background;
color: $form-disabled-color;
}
Expand Down