From 368a2b204ae3c5d87b74357812f838038a09b615 Mon Sep 17 00:00:00 2001 From: bach Date: Tue, 15 Sep 2026 09:41:05 +0200 Subject: [PATCH] reperers/en pratique backcard opacity --- .../themes/custom/mathallo/assets/scss/main.scss | 12 +++++++----- .../themes/custom/mathallo/templates/field.html.twig | 4 ++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/web_main/themes/custom/mathallo/assets/scss/main.scss b/web_main/themes/custom/mathallo/assets/scss/main.scss index cc958cf..3938b76 100644 --- a/web_main/themes/custom/mathallo/assets/scss/main.scss +++ b/web_main/themes/custom/mathallo/assets/scss/main.scss @@ -655,7 +655,7 @@ main[role="main"]{ @mixin front-card{ z-index: 2; background-color: #fff; - &>*>*{ + div.field>div:not(.field-label){ opacity: 1; } .field-label{ @@ -667,16 +667,18 @@ main[role="main"]{ @mixin back-card{ z-index: 1; background-color: rgba(247,247,247,1); - // &>*>*{ - // opacity: 0.6; - // } + div.field>div:not(.field-label){ + opacity: 0.3; + } .field-label{ color: inherit; font-weight: 600; background-color: rgba(247,247,247,1); } } - + div.field>div:not(.field-label){ + transition: all 0.3s ease-in-out; + } &.field-principes-reflexion{ @include front-card(); } diff --git a/web_main/themes/custom/mathallo/templates/field.html.twig b/web_main/themes/custom/mathallo/templates/field.html.twig index 0acbf1d..e75e26c 100644 --- a/web_main/themes/custom/mathallo/templates/field.html.twig +++ b/web_main/themes/custom/mathallo/templates/field.html.twig @@ -46,7 +46,7 @@ {% if label_hidden %} {% if multiple %} - + {% for item in items %} {{ item.content }} {% endfor %} @@ -57,7 +57,7 @@ {% endfor %} {% endif %} {% else %} - + {{ label }}