diff --git a/assets/scss/menu.scss b/assets/scss/menu.scss index 5542b27..1e820d6 100644 --- a/assets/scss/menu.scss +++ b/assets/scss/menu.scss @@ -1,4 +1,4 @@ -// (C) 2023 GoodData Corporation +// (C) 2025 GoodData Corporation @import "variables/variables"; .td-sidebar { @@ -14,15 +14,15 @@ .gd-docs-menu { position: fixed; - top: $header-first-nav-height-desktop + 1px; + top: $header-first-nav-height + 1px; bottom: 0; left: -100%; - z-index: 32; + z-index: 33; overflow: auto; width: calc(100% - 55px); flex: 1 1 auto; - padding: 0 20px 20px; - background: $color-mist-gray; + padding: 32px 40px; + background: #f8f8f8; transition: $transition; @include mq(large) { @@ -34,7 +34,6 @@ z-index: 0; width: 100%; max-width: 380px; - padding: 32px 40px; @supports(position: sticky) { position: sticky; @@ -47,64 +46,43 @@ opacity: 0; } - &__mobile-btn { + &__mobile-trigger { + display: none; + } + + &__mobile-icon { position: fixed; - top: $header-first-nav-height-desktop; - left: 10px; - z-index: 34; + top: 80px; display: flex; justify-content: center; align-items: center; width: 55px; height: $header-second-nav-height; - padding: 0; - background: transparent; - border: none; + left: 10px; + z-index: 34; transition: $transition; cursor: pointer; - &:focus { - outline: 2px solid $color-shocking-pink; - outline-offset: 2px; - } - - @include mq(large) { - display: none; - } - } - - &__mobile-icon { - position: relative; - display: flex; - justify-content: center; - align-items: center; - width: 26px; - height: 22px; - &::before { content: url("../img/burger.svg"); display: block; width: 26px; height: 22px; } - } - &__mobile-btn[aria-expanded="true"] { - left: calc(100% - 55px); - - .gd-docs-menu__mobile-icon::before { - display: none; - } - - .gd-docs-menu__mobile-icon::after { + &::after { content: ""; - display: block; + display: none; width: 31px; height: 31px; background-image: url("../img/close.svg"); background-repeat: no-repeat; background-size: contain; } + + @include mq(large) { + display: none; + } } &__mobile-bg { @@ -121,12 +99,23 @@ display: none; } } - - &__mobile-btn[aria-expanded="true"] ~ &, - &__mobile-btn[aria-expanded="true"] ~ &__mobile-bg { + &__mobile-trigger:checked ~ &, + &__mobile-trigger:checked ~ &__mobile-bg { left: 0; } + &__mobile-trigger:checked ~ &__mobile-icon { + left: calc(100% - 55px); + + &::before { + display: none; + } + + &::after { + display: block; + } + } + & > &-section { padding-left: 0; } @@ -150,14 +139,6 @@ } } - &-section-wrapper { - display: none; - - &.expanded { - display: block !important; - } - } - &-page__label ~ &-section { padding-left: 0; } @@ -210,41 +191,23 @@ } } - &__toggle-btn { - display: flex; - align-items: center; - justify-content: center; + &__toggle { + display: none; + } + + &__chevron { margin: 4px 0 0; - padding: 4px; - background: transparent; - border: none; cursor: pointer; - transition: none; - - // Add focus styles for keyboard navigation - &:focus { - outline: 2px solid -webkit-focus-ring-color; - outline-offset: 2px; - border-radius: 1px; - } - - // SVG rotation based on expanded state - &[aria-expanded="false"] .gd-docs-menu-page__chevron svg { + + svg { transform: rotate(180deg); } - - &[aria-expanded="true"] .gd-docs-menu-page__chevron svg { - transform: rotate(0deg); - } } - &__chevron { - display: flex; - margin: 0; - } - - &__toggle { - display: none; + &__toggle:checked ~ &__title &__chevron { + svg { + transform: rotate(0deg); + } } &__label { @@ -258,13 +221,19 @@ } } + &-page__toggle ~ &-section { + display: none; + } + + &-page__toggle:checked ~ &-section { + display: block; + } .dropdown-toggle { display: flex; justify-content: space-between; width: 100%; height: 36px; margin-bottom: 10px; - margin-top: 10px; padding: 10px 16px; border: 1px solid $color-dove-gray; border-radius: 4px; @@ -284,4 +253,13 @@ display: none; } } -} + h4 { + margin-top: 0; + margin-bottom: 1rem; + padding-bottom: 1rem; + border-bottom: 1px solid $color-dove-gray; + font-family: $gdfont-demibold; + font-size: 21px; + line-height: 1.25; + } +} \ No newline at end of file diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html index 022a12f..5e2ba88 100644 --- a/layouts/docs/baseof.html +++ b/layouts/docs/baseof.html @@ -18,7 +18,6 @@