From 35aef22e2165ab7b9d7148fff997baf63ac1ab5d Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Fri, 5 May 2023 19:19:39 -0700 Subject: [PATCH] enh(NcActions): Readability Signed-off-by: Christopher Ng --- src/assets/action.scss | 6 ------ src/components/NcActionCheckbox/NcActionCheckbox.vue | 11 ----------- src/components/NcActionInput/NcActionInput.vue | 6 ------ src/components/NcActionRadio/NcActionRadio.vue | 11 ----------- .../NcActionTextEditable/NcActionTextEditable.vue | 10 ++-------- src/components/NcActions/NcActions.vue | 1 - 6 files changed, 2 insertions(+), 43 deletions(-) diff --git a/src/assets/action.scss b/src/assets/action.scss index 2b00cc6878..a0de92a020 100644 --- a/src/assets/action.scss +++ b/src/assets/action.scss @@ -61,7 +61,6 @@ cursor: pointer; white-space: nowrap; - opacity: $opacity_normal; color: var(--color-main-text); border: 0; border-radius: 0; // otherwise Safari will cut the border-radius area @@ -72,11 +71,6 @@ font-size: var(--default-font-size); line-height: $clickable-area; - &:hover, - &:focus { - opacity: $opacity_full; - } - & > span { cursor: pointer; white-space: nowrap; diff --git a/src/components/NcActionCheckbox/NcActionCheckbox.vue b/src/components/NcActionCheckbox/NcActionCheckbox.vue index 846fca4215..21fcac1a75 100644 --- a/src/components/NcActionCheckbox/NcActionCheckbox.vue +++ b/src/components/NcActionCheckbox/NcActionCheckbox.vue @@ -193,9 +193,6 @@ export default { width: 1px; height: 1px; - &:focus + .action-checkbox__label { - opacity: $opacity_full; - } } &__label { @@ -206,7 +203,6 @@ export default { padding: 0 !important; padding-right: $icon-margin !important; - opacity: $opacity_normal; // checkbox-width is 12px, border is 2 // (44 - 14 - 2) / 2 = 14 &::before { @@ -220,13 +216,6 @@ export default { cursor: pointer; } } - - &:not(.action-checkbox--disabled):hover, - &:not(.action-checkbox--disabled):focus { - .action-checkbox__label { - opacity: $opacity_full; - } - } } diff --git a/src/components/NcActionInput/NcActionInput.vue b/src/components/NcActionInput/NcActionInput.vue index 238fd6a1f9..7ede12b19a 100644 --- a/src/components/NcActionInput/NcActionInput.vue +++ b/src/components/NcActionInput/NcActionInput.vue @@ -494,7 +494,6 @@ $input-margin: 4px; cursor: pointer; white-space: nowrap; - opacity: $opacity_normal; color: var(--color-main-text); border: 0; border-radius: 0; // otherwise Safari will cut the border-radius area @@ -503,11 +502,6 @@ $input-margin: 4px; font-weight: normal; - &:hover, - &:focus { - opacity: $opacity_full; - } - &__icon-wrapper { display: flex; align-self: center; diff --git a/src/components/NcActionRadio/NcActionRadio.vue b/src/components/NcActionRadio/NcActionRadio.vue index 55d6d72eb2..1403ef1fcb 100644 --- a/src/components/NcActionRadio/NcActionRadio.vue +++ b/src/components/NcActionRadio/NcActionRadio.vue @@ -188,9 +188,6 @@ export default { width: 1px; height: 1px; - &:focus + .action-radio__label { - opacity: $opacity_full; - } } &__label { @@ -201,7 +198,6 @@ export default { padding: 0 !important; padding-right: $icon-margin !important; - opacity: $opacity_normal; // radio-width is 12px, border is 2 // (44 - 14 - 2) / 2 = 14 &::before { @@ -215,13 +211,6 @@ export default { cursor: pointer; } } - - &:not(.action-radio--disabled):hover, - &:not(.action-radio--disabled):focus { - .action-radio__label { - opacity: $opacity_full; - } - } } diff --git a/src/components/NcActionTextEditable/NcActionTextEditable.vue b/src/components/NcActionTextEditable/NcActionTextEditable.vue index cfb3a5bee0..143014f4da 100644 --- a/src/components/NcActionTextEditable/NcActionTextEditable.vue +++ b/src/components/NcActionTextEditable/NcActionTextEditable.vue @@ -207,7 +207,6 @@ $input-margin: 4px; cursor: pointer; white-space: nowrap; - opacity: $opacity_normal; color: var(--color-main-text); border: 0; border-radius: 0; // otherwise Safari will cut the border-radius area @@ -217,11 +216,6 @@ $input-margin: 4px; font-weight: normal; line-height: $clickable-area; - &:hover, - &:focus { - opacity: $opacity_full; - } - & > span { cursor: pointer; white-space: nowrap; @@ -283,8 +277,6 @@ $input-margin: 4px; margin: 0; padding: 7px 6px; - opacity: $opacity_full; - color: var(--color-text-maxcontrast); border: 0; border-radius: 50%; /* Avoid background under border */ @@ -299,6 +291,8 @@ $input-margin: 4px; /* Inputs inside popover supports text, submit & reset */ &__textarea { flex: 1 1 auto; + color: inherit; + border-color: var(--color-border-maxcontrast); min-height: #{$clickable-area * 2 - $input-margin * 2}; /* twice the element margin-y */ max-height: #{$clickable-area * 3 - $input-margin * 2}; /* twice the element margin-y */ diff --git a/src/components/NcActions/NcActions.vue b/src/components/NcActions/NcActions.vue index 9a33923547..987e658abb 100644 --- a/src/components/NcActions/NcActions.vue +++ b/src/components/NcActions/NcActions.vue @@ -1239,7 +1239,6 @@ export default { } &.action-item--open .action-item__menutoggle { - opacity: $opacity_full; background-color: var(--open-background-color); } }