Skip to content

Commit fc52f6f

Browse files
authored
Merge pull request #61668 from nextcloud/fix/search-input-document-flow
fix(core): keep the header search input in document flow
2 parents 46f53be + 3c39515 commit fc52f6f

9 files changed

Lines changed: 37 additions & 17 deletions

File tree

core/css/header.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/css/header.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/css/header.scss

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060
overflow: hidden;
6161
margin: 2px;
6262

63-
&:hover, &:active {
63+
&:hover,
64+
&:active {
6465
opacity: 1;
6566
}
6667

@@ -112,15 +113,38 @@
112113
min-width: 0;
113114
}
114115

116+
// This is the center part of the header
117+
// for the user template it contains unified search
118+
.header-center {
119+
display: inline-flex;
120+
align-items: center;
121+
justify-content: flex-end;
122+
flex: 0 1 auto;
123+
white-space: nowrap;
124+
min-width: 0;
125+
}
126+
115127
// This is the last part of the header
116-
// It contains the short cuts like unified search, contacts-, or account menu
128+
// It contains the short cuts like contacts-, or account menu
117129
.header-end {
118130
display: inline-flex;
119131
align-items: center;
120132
justify-content: flex-end;
121133
flex-shrink: 1;
122134
// Add some spacing so the last entry looks ok
123135
margin-inline-end: calc(3 * var(--default-grid-baseline));
136+
137+
// Only grow to match header-start on desktop, and only
138+
// in the user layout where header-center exists.
139+
// Below the mobile breakpoint the search collapses to an icon,
140+
// and header-end must stay content-sized so header-start pushes
141+
// that icon flush to the right edge. The public layout has
142+
// no centered search, so it keeps the content-sized header-end.
143+
@media (min-width: 512px) {
144+
#body-user & {
145+
flex: 1 0;
146+
}
147+
}
124148
}
125149

126150
// Public layout related headers
@@ -148,7 +172,7 @@
148172
text-overflow: ellipsis;
149173
}
150174

151-
.header-shared-by {
175+
.header-shared-by {
152176
color: var(--color-background-plain-text);
153177
position: relative;
154178
font-weight: 300;

core/css/server.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)