From 95adbfcc12d1e278ff4466e05dd586693223c088 Mon Sep 17 00:00:00 2001 From: Petar Petrov Date: Fri, 27 Dec 2024 13:44:05 +0100 Subject: [PATCH 1/2] Revert "Automation/Script editor border-radius fix (#23267)" This reverts commit e9b2a8341142543941b0f5c366a8ab354c7d79d4. --- .../config/automation/action/ha-automation-action-row.ts | 5 ++--- .../automation/condition/ha-automation-condition-row.ts | 7 ++++--- .../config/automation/trigger/ha-automation-trigger-row.ts | 7 ++++--- src/panels/config/script/ha-script-field-row.ts | 5 ++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/panels/config/automation/action/ha-automation-action-row.ts b/src/panels/config/automation/action/ha-automation-action-row.ts index ebccfa306e20..bd4fa868a18a 100644 --- a/src/panels/config/automation/action/ha-automation-action-row.ts +++ b/src/panels/config/automation/action/ha-automation-action-row.ts @@ -614,9 +614,6 @@ export default class HaAutomationActionRow extends LitElement { ha-icon-button { --mdc-theme-text-primary-on-background: var(--primary-text-color); } - ha-card { - overflow: hidden; - } .disabled { opacity: 0.5; pointer-events: none; @@ -649,6 +646,8 @@ export default class HaAutomationActionRow extends LitElement { .disabled-bar { background: var(--divider-color, #e0e0e0); text-align: center; + border-top-right-radius: var(--ha-card-border-radius); + border-top-left-radius: var(--ha-card-border-radius); } mwc-list-item[disabled] { diff --git a/src/panels/config/automation/condition/ha-automation-condition-row.ts b/src/panels/config/automation/condition/ha-automation-condition-row.ts index 8df41296e8f6..864a24fed4a7 100644 --- a/src/panels/config/automation/condition/ha-automation-condition-row.ts +++ b/src/panels/config/automation/condition/ha-automation-condition-row.ts @@ -504,9 +504,6 @@ export default class HaAutomationConditionRow extends LitElement { ha-button-menu { --mdc-theme-text-primary-on-background: var(--primary-text-color); } - ha-card { - overflow: hidden; - } .disabled { opacity: 0.5; pointer-events: none; @@ -539,6 +536,8 @@ export default class HaAutomationConditionRow extends LitElement { .disabled-bar { background: var(--divider-color, #e0e0e0); text-align: center; + border-top-right-radius: var(--ha-card-border-radius); + border-top-left-radius: var(--ha-card-border-radius); } ha-list-item[disabled] { --mdc-theme-text-primary-on-background: var(--disabled-text-color); @@ -560,6 +559,8 @@ export default class HaAutomationConditionRow extends LitElement { overflow: hidden; transition: max-height 0.3s; text-align: center; + border-top-right-radius: var(--ha-card-border-radius, 12px); + border-top-left-radius: var(--ha-card-border-radius, 12px); } .testing.active { max-height: 100px; diff --git a/src/panels/config/automation/trigger/ha-automation-trigger-row.ts b/src/panels/config/automation/trigger/ha-automation-trigger-row.ts index 13efcbf7e7b5..b45d776ba027 100644 --- a/src/panels/config/automation/trigger/ha-automation-trigger-row.ts +++ b/src/panels/config/automation/trigger/ha-automation-trigger-row.ts @@ -651,9 +651,6 @@ export default class HaAutomationTriggerRow extends LitElement { ha-button-menu { --mdc-theme-text-primary-on-background: var(--primary-text-color); } - ha-card { - overflow: hidden; - } .disabled { opacity: 0.5; pointer-events: none; @@ -686,6 +683,8 @@ export default class HaAutomationTriggerRow extends LitElement { .disabled-bar { background: var(--divider-color, #e0e0e0); text-align: center; + border-top-right-radius: var(--ha-card-border-radius); + border-top-left-radius: var(--ha-card-border-radius); } .triggered { cursor: pointer; @@ -702,6 +701,8 @@ export default class HaAutomationTriggerRow extends LitElement { overflow: hidden; transition: max-height 0.3s; text-align: center; + border-top-right-radius: var(--ha-card-border-radius, 12px); + border-top-left-radius: var(--ha-card-border-radius, 12px); } .triggered.active { max-height: 100px; diff --git a/src/panels/config/script/ha-script-field-row.ts b/src/panels/config/script/ha-script-field-row.ts index e652b1f8cb76..2542394ce953 100644 --- a/src/panels/config/script/ha-script-field-row.ts +++ b/src/panels/config/script/ha-script-field-row.ts @@ -295,9 +295,6 @@ export default class HaScriptFieldRow extends LitElement { ha-icon-button { --mdc-theme-text-primary-on-background: var(--primary-text-color); } - ha-card { - overflow: hidden; - } .disabled { opacity: 0.5; pointer-events: none; @@ -330,6 +327,8 @@ export default class HaScriptFieldRow extends LitElement { .disabled-bar { background: var(--divider-color, #e0e0e0); text-align: center; + border-top-right-radius: var(--ha-card-border-radius); + border-top-left-radius: var(--ha-card-border-radius); } ha-list-item[disabled] { From ab9759c6ddbb9ade120eb300419e77c415caaec5 Mon Sep 17 00:00:00 2001 From: Petar Petrov Date: Fri, 27 Dec 2024 13:47:10 +0100 Subject: [PATCH 2/2] Add default border-radius values to `.disabled-bar` --- .../config/automation/action/ha-automation-action-row.ts | 4 ++-- .../automation/condition/ha-automation-condition-row.ts | 4 ++-- .../config/automation/trigger/ha-automation-trigger-row.ts | 4 ++-- src/panels/config/script/ha-script-field-row.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/panels/config/automation/action/ha-automation-action-row.ts b/src/panels/config/automation/action/ha-automation-action-row.ts index bd4fa868a18a..c36f1be56f2c 100644 --- a/src/panels/config/automation/action/ha-automation-action-row.ts +++ b/src/panels/config/automation/action/ha-automation-action-row.ts @@ -646,8 +646,8 @@ export default class HaAutomationActionRow extends LitElement { .disabled-bar { background: var(--divider-color, #e0e0e0); text-align: center; - border-top-right-radius: var(--ha-card-border-radius); - border-top-left-radius: var(--ha-card-border-radius); + border-top-right-radius: var(--ha-card-border-radius, 12px); + border-top-left-radius: var(--ha-card-border-radius, 12px); } mwc-list-item[disabled] { diff --git a/src/panels/config/automation/condition/ha-automation-condition-row.ts b/src/panels/config/automation/condition/ha-automation-condition-row.ts index 864a24fed4a7..ded7354eca3c 100644 --- a/src/panels/config/automation/condition/ha-automation-condition-row.ts +++ b/src/panels/config/automation/condition/ha-automation-condition-row.ts @@ -536,8 +536,8 @@ export default class HaAutomationConditionRow extends LitElement { .disabled-bar { background: var(--divider-color, #e0e0e0); text-align: center; - border-top-right-radius: var(--ha-card-border-radius); - border-top-left-radius: var(--ha-card-border-radius); + border-top-right-radius: var(--ha-card-border-radius, 12px); + border-top-left-radius: var(--ha-card-border-radius, 12px); } ha-list-item[disabled] { --mdc-theme-text-primary-on-background: var(--disabled-text-color); diff --git a/src/panels/config/automation/trigger/ha-automation-trigger-row.ts b/src/panels/config/automation/trigger/ha-automation-trigger-row.ts index b45d776ba027..43c8758e610b 100644 --- a/src/panels/config/automation/trigger/ha-automation-trigger-row.ts +++ b/src/panels/config/automation/trigger/ha-automation-trigger-row.ts @@ -683,8 +683,8 @@ export default class HaAutomationTriggerRow extends LitElement { .disabled-bar { background: var(--divider-color, #e0e0e0); text-align: center; - border-top-right-radius: var(--ha-card-border-radius); - border-top-left-radius: var(--ha-card-border-radius); + border-top-right-radius: var(--ha-card-border-radius, 12px); + border-top-left-radius: var(--ha-card-border-radius, 12px); } .triggered { cursor: pointer; diff --git a/src/panels/config/script/ha-script-field-row.ts b/src/panels/config/script/ha-script-field-row.ts index 2542394ce953..f214216c8452 100644 --- a/src/panels/config/script/ha-script-field-row.ts +++ b/src/panels/config/script/ha-script-field-row.ts @@ -327,8 +327,8 @@ export default class HaScriptFieldRow extends LitElement { .disabled-bar { background: var(--divider-color, #e0e0e0); text-align: center; - border-top-right-radius: var(--ha-card-border-radius); - border-top-left-radius: var(--ha-card-border-radius); + border-top-right-radius: var(--ha-card-border-radius, 12px); + border-top-left-radius: var(--ha-card-border-radius, 12px); } ha-list-item[disabled] {