Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Avoid doubled loading of sidemenu class for specificity and remove conflicting styles instead

Henriette Darge80515a29dbbf
diff --git a/frontend/src/global_styles/content/_index.sass b/frontend/src/global_styles/content/_index.sass
index 5497c4a6765..1f8cf438f2e 100644
--- a/frontend/src/global_styles/content/_index.sass
+++ b/frontend/src/global_styles/content/_index.sass
@@ -73,6 +73,7 @@
@import resizer
@import version
@import project_status
+@import sidemenu
@import sidebar
@import activity_list
@import activity_days
diff --git a/frontend/src/global_styles/content/_sidebar.sass b/frontend/src/global_styles/content/_sidebar.sass
index b7cd02ddca4..091ec341854 100644
--- a/frontend/src/global_styles/content/_sidebar.sass
+++ b/frontend/src/global_styles/content/_sidebar.sass
@@ -22,9 +22,3 @@
.button .spot-icon
margin-right: 0.5rem
-
- @import "sidemenu"
-
-#menu-sidebar
- // This import under #menu-sidebar is needed for CSS specificity reasons.
- @import "sidemenu"
diff --git a/frontend/src/global_styles/content/_sidemenu.sass b/frontend/src/global_styles/content/_sidemenu.sass
index 4d7ad6b3aab..fa38abfb665 100644
--- a/frontend/src/global_styles/content/_sidemenu.sass
+++ b/frontend/src/global_styles/content/_sidemenu.sass
@@ -1,8 +1,4 @@
.op-sidemenu
- display: flex
- flex-direction: column
- font-size: 14px
-
&--title
display: flex
background: transparent
@@ -13,9 +9,8 @@
margin-top: 12px
font-size: 12px
cursor: pointer
+ width: 100%
- &.-spread
- justify-content: space-between
&:hover
background: var(--main-menu-bg-hover-background)
diff --git a/frontend/src/global_styles/layout/_main_menu.sass b/frontend/src/global_styles/layout/_main_menu.sass
index 9f4544e2245..67746c571c0 100644
--- a/frontend/src/global_styles/layout/_main_menu.sass
+++ b/frontend/src/global_styles/layout/_main_menu.sass
@@ -94,7 +94,7 @@ $arrow-left-width: 40px
li a
// work around due to dom manipulation on document: ready:
// this isn't scoped to .main-item-wrapper to avoid flickering
- padding-left: 11px
+ padding-left: 12px
&.toggler
// explicitly reset to zero to avoid selector precedence problems
padding-left: 0
@@ -105,7 +105,6 @@ $arrow-left-width: 40px
a
text-decoration: none
line-height: var(--main-menu-item-height)
- display: block
position: relative
height: var(--main-menu-item-height)
color: var(--main-menu-font-color)
@@ -113,6 +112,7 @@ $arrow-left-width: 40px
font-weight: normal
font-size: var(--main-menu-font-size)
font-style: normal
+ padding: 0 12px
&:hover
text-decoration: none
diff --git a/modules/meeting/app/views/meetings/_menu_query_select.html.erb b/modules/meeting/app/views/meetings/_menu_query_select.html.erb
index 0aae6157a85..294cc3868a7 100644
--- a/modules/meeting/app/views/meetings/_menu_query_select.html.erb
+++ b/modules/meeting/app/views/meetings/_menu_query_select.html.erb
@@ -42,14 +42,14 @@ See COPYRIGHT and LICENSE files for more details.
data-controller="menus--expandable-sidemenu"
data-application-target="dynamic">
- <button class="op-sidemenu--title -spread"
+ <button class="op-sidemenu--title"
type="button"
data-action="click->menus--expandable-sidemenu#toggleContainer">
- <%= t(:label_involvement) %>
<span class="icon3 icon-small icon-arrow-up1"
aria-hidden="true"
data-menus--expandable-sidemenu-target="indicator">
</span>
+ <%= t(:label_involvement) %>
</button>
<ul class="op-sidemenu--items"
@@ -77,4 +77,3 @@ See COPYRIGHT and LICENSE files for more details.
<% end %>
</div>
</div>
-