From 058a2bdbb38a98d22b52d419361f22384e2e045d Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Thu, 24 Sep 2026 16:44:30 +0200 Subject: [PATCH] Update cookcli-recipe-strategy.js --- .../cookcli/www/cookcli-recipe-strategy.js | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/custom_components/cookcli/www/cookcli-recipe-strategy.js b/custom_components/cookcli/www/cookcli-recipe-strategy.js index 77c77c4..4d79cf3 100644 --- a/custom_components/cookcli/www/cookcli-recipe-strategy.js +++ b/custom_components/cookcli/www/cookcli-recipe-strategy.js @@ -117,6 +117,7 @@ class CookCliRecipeViewStrategy extends HTMLElement { // Largeur unique de tous les boutons de navigation (Commencer, Précédent, // Suivant) : c'est elle qu'on ajuste pour les agrandir ou les réduire. static NAV_BUTTON_WIDTH = "clamp(96px, 26vw, 150px)"; + static NAV_BUTTON_WIDTH_MOBILE = "clamp(46px, 20vw, 100px)"; static async generate(config, hass) { config = config || {}; @@ -231,16 +232,21 @@ class CookCliRecipeViewStrategy extends HTMLElement { : `background: var(--secondary-background-color);`} } @media (max-width: 869px) { - ha-card > span { - border: 0 !important; - clip-path: inset(50%) !important; - height: 1px !important; - margin: -1px !important; - overflow: hidden !important; - padding: 0 !important; - width: 1px !important; - white-space: nowrap !important; - } + :host { + flex: 0 0 ${this.NAV_BUTTON_WIDTH_MOBILE} !important; + width: ${this.NAV_BUTTON_WIDTH_MOBILE} !important; + height: ${this.NAV_BUTTON_WIDTH_MOBILE} !important; + } + ha-card > span { + border: 0 !important; + clip-path: inset(50%) !important; + height: 1px !important; + margin: -1px !important; + overflow: hidden !important; + padding: 0 !important; + width: 1px !important; + white-space: nowrap !important; + } } `, },