From 87b2c72449a71e7d8d4724af477bce922372482b Mon Sep 17 00:00:00 2001 From: Ersun Warncke Date: Wed, 16 Jan 2019 13:04:11 -0400 Subject: [PATCH] Merge pull request #1410 from sharelatex/ew-make-logout-area-clickable make area around logout button clickable GitOrigin-RevId: 8f080c6bedb7dce2ac39d877e8076b83241a4c12 --- services/web/app/views/layout/navbar.pug | 7 +++---- .../web/public/stylesheets/components/buttons.less | 12 ------------ .../web/public/stylesheets/components/dropdowns.less | 11 +++++++++-- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/services/web/app/views/layout/navbar.pug b/services/web/app/views/layout/navbar.pug index 1e517ba9a6..814bb53cef 100644 --- a/services/web/app/views/layout/navbar.pug +++ b/services/web/app/views/layout/navbar.pug @@ -91,7 +91,6 @@ nav.navbar.navbar-default.navbar-main a(href="/user/subscription") #{translate('subscription')} li.divider li - a(href="#") - form(method="POST" action="/logout") - input(name='_csrf', type='hidden', value=csrfToken) - button.btn-unstyled #{translate('log_out')} + form(method="POST" action="/logout") + input(name='_csrf', type='hidden', value=csrfToken) + button.btn-link.text-left.dropdown-menu-button #{translate('log_out')} diff --git a/services/web/public/stylesheets/components/buttons.less b/services/web/public/stylesheets/components/buttons.less index 80459900b9..d64c50dd8c 100755 --- a/services/web/public/stylesheets/components/buttons.less +++ b/services/web/public/stylesheets/components/buttons.less @@ -121,18 +121,6 @@ } } -// Unstyled button -// ------------------------- - -// Remove styling from button so that text is style like parent -.btn-unstyled { - background: none; - border: none; - margin: 0; - outline: none; - padding: 0; -} - // Button Sizes // -------------------------------------------------- diff --git a/services/web/public/stylesheets/components/dropdowns.less b/services/web/public/stylesheets/components/dropdowns.less index b8b4db6118..1827b6ea03 100755 --- a/services/web/public/stylesheets/components/dropdowns.less +++ b/services/web/public/stylesheets/components/dropdowns.less @@ -60,7 +60,7 @@ } // Links and other items within the dropdown menu - > li > a,div { + > li > a,div, .dropdown-menu-button { display: block; padding: @dropdown-item-padding; clear: both; @@ -75,10 +75,17 @@ color: #7a7a7a } } + + // button specific styles + .dropdown-menu-button { + border: none; + outline: none; + width: 100%; + } } // Hover/Focus state -.dropdown-menu > li > a { +.dropdown-menu > li > a, .dropdown-menu .dropdown-menu-button { &:hover, &:focus { text-decoration: none;