From 81395a9b9e01e575952d8ba299c9b88acc13faf8 Mon Sep 17 00:00:00 2001 From: M Fahru Date: Thu, 31 Oct 2024 08:50:53 -0700 Subject: [PATCH] Merge pull request #21452 from overleaf/mf-fix-bs5-navbar [web] Add missing css rules for the `primary` navbar link item style GitOrigin-RevId: a1e2428f994af52c8af01371eca39cc16526566c --- .../stylesheets/bootstrap-5/components/nav.scss | 7 +++++++ .../stylesheets/bootstrap-5/components/navbar.scss | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/services/web/frontend/stylesheets/bootstrap-5/components/nav.scss b/services/web/frontend/stylesheets/bootstrap-5/components/nav.scss index aad874fe04..b36e691fcb 100644 --- a/services/web/frontend/stylesheets/bootstrap-5/components/nav.scss +++ b/services/web/frontend/stylesheets/bootstrap-5/components/nav.scss @@ -33,6 +33,13 @@ --navbar-subdued-hover-bg: var(--white); --navbar-subdued-hover-color: var(--green-50); + // Properties of "primary" items + --navbar-primary-color: var(--white); + --navbar-primary-border-color: var(--green-50); + --navbar-primary-bg: var(--green-50); + --navbar-primary-hover-bg: var(--green-60); + --navbar-primary-hover-border-color: var(--navbar-primary-hover-bg); + // Links --navbar-link-color: var(--white); --navbar-link-border-color: var(--navbar-link-color); diff --git a/services/web/frontend/stylesheets/bootstrap-5/components/navbar.scss b/services/web/frontend/stylesheets/bootstrap-5/components/navbar.scss index 20e873772d..a89ed2bcfb 100644 --- a/services/web/frontend/stylesheets/bootstrap-5/components/navbar.scss +++ b/services/web/frontend/stylesheets/bootstrap-5/components/navbar.scss @@ -84,6 +84,19 @@ background-color: var(--navbar-subdued-hover-bg); } } + + &.primary > .nav-link { + color: var(--navbar-primary-color); + background-color: var(--navbar-primary-bg); + border-color: var(--navbar-primary-border-color); + + &.show, + &:hover, + &:focus { + background-color: var(--navbar-primary-hover-bg); + border-color: var(--navbar-primary-hover-border-color); + } + } } }