From 49ebb66c646df66a55ea61462ae4df059e825fe4 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Sat, 18 Feb 2023 11:27:20 +0100 Subject: [PATCH] Prepare states for FAQ --- sass/style.scss | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sass/style.scss b/sass/style.scss index f154be3..31d428a 100644 --- a/sass/style.scss +++ b/sass/style.scss @@ -172,6 +172,9 @@ section { padding: 2em; cursor: pointer; + background-color: inherit; + transition: all .5s ease; + // Hide bottom border. // It is -2px to avoid float rounding errors // which cause the border to appear in some widths. @@ -192,10 +195,14 @@ section { &.active { background-color: $col-accent; - border-radius: 2rem; z-index: 1; &:before { border: 0 } + + .answer { + height: auto; + margin-top: 1em; + } } .mark { @@ -203,9 +210,14 @@ section { } .question { - margin-bottom: 1em; font-size: 1.138rem; } + + .answer { + height: 0; + overflow: hidden; + transition: all .5s ease; + } } }