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

Fix several app-header search styling issues on mobile (#9416)

Benjamin Bädorf89bd15516db4
diff --git a/frontend/src/app/core/global_search/input/global-search-input.component.sass b/frontend/src/app/core/global_search/input/global-search-input.component.sass
index 18d091d978f..9dd26530184 100644
--- a/frontend/src/app/core/global_search/input/global-search-input.component.sass
+++ b/frontend/src/app/core/global_search/input/global-search-input.component.sass
@@ -13,7 +13,7 @@ $search-input-height: 30px
line-height: var(--header-height)
margin: 0 15px
- @media screen and (max-width: 680px)
+ @media screen and (max-width: 679px)
margin: 0
&--back-button
@@ -32,7 +32,7 @@ $search-input-height: 30px
// TODO: This should be using @include breakpoint(680px down)
// Which is hard to do since we don't have access here and it'll
// probably require a larger sass import refactoring
- @media screen and (max-width: 680px)
+ @media screen and (max-width: 679px)
position: relative
padding: 0 8px
@@ -73,7 +73,11 @@ $search-input-height: 30px
text-align: center
.ng-input
- top: 0
+ @media screen and (max-width: 679px)
+ // TODO: We need to do this because the default ng-select theme uses a specificity of 5(!) classes
+ // We should probably remove the default theme altogether at some point
+ top: 0 !important
+
input
color: var(--header-item-font-color)
height: $search-input-height
diff --git a/frontend/src/app/core/global_search/input/global-search.component.sass b/frontend/src/app/core/global_search/input/global-search.component.sass
index c533a048cff..9adcfe43f7b 100644
--- a/frontend/src/app/core/global_search/input/global-search.component.sass
+++ b/frontend/src/app/core/global_search/input/global-search.component.sass
@@ -1,6 +1,9 @@
.global-search
flex-grow: 1
+ @media screen and (max-width: 679px)
+ display: none
+
&--option,
&--option:hover
padding: 5px 5px
diff --git a/frontend/src/global_styles/common/header/app-header.sass b/frontend/src/global_styles/common/header/app-header.sass
index 327e011161d..23f95559338 100644
--- a/frontend/src/global_styles/common/header/app-header.sass
+++ b/frontend/src/global_styles/common/header/app-header.sass
@@ -13,7 +13,7 @@
border-bottom-color: var(--header-border-bottom-color)
width: 100vw
- @include breakpoint(680px down)
+ @media screen and (max-width: 679px)
position: fixed
top: 0
left: 0
@@ -44,7 +44,7 @@
border: 1px solid var(--header-item-font-color)
&_search-open
- @include breakpoint(680px down)
+ @media screen and (max-width: 679px)
display: flex
.op-app-header--start,
@@ -57,6 +57,9 @@
.op-app-search
flex-grow: 1
+ .global-search
+ display: block
+
.top-menu-search
margin: 0
@@ -64,7 +67,7 @@
display: none
color: var(--header-item-font-color)
- @include breakpoint(480px down)
+ @media screen and (max-width: 379px)
.op-app-menu
display: none
diff --git a/frontend/src/global_styles/common/header/app-menu.sass b/frontend/src/global_styles/common/header/app-menu.sass
index 76ae215620b..9a00d0fe814 100644
--- a/frontend/src/global_styles/common/header/app-menu.sass
+++ b/frontend/src/global_styles/common/header/app-menu.sass
@@ -18,6 +18,7 @@
&--item-title
min-width: 0px
+ white-space: nowrap
&--item-action
background: transparent
diff --git a/frontend/src/global_styles/common/header/app-search.sass b/frontend/src/global_styles/common/header/app-search.sass
index 536c56456bf..012169e1e84 100644
--- a/frontend/src/global_styles/common/header/app-search.sass
+++ b/frontend/src/global_styles/common/header/app-search.sass
@@ -1,3 +1,3 @@
.op-app-search
- @include breakpoint(680px down)
+ @media screen and (max-width: 679px)
flex-grow: 0