Skip to content

Commit 9af89d5

Browse files
author
Stefanie Hein
committed
Merge branch 'css-responsive-patch-67341'
* css-responsive-patch-67341: Sticky-Header: enhance comment Add compiled code Sticky-Header: hide sticky-header initially and only show it when there is an actual header inside it. This prevents a layout gap in the compare-view, where the sticky header would mistakenly take up a row/column in the grid. See #67341 Map: allows map buttons to wrap onto a new line. Block: remove mixin from CUI that is used only in fylr theme. Add compiled code Sticky Header: fix regression bug where sticky header would not work correctly anymore after being a child of @container, fixed by using position: sticky, tweak sticky header background to be less transparent. See #67341
2 parents d58c8fb + 5fd4bdf commit 9af89d5

5 files changed

Lines changed: 34 additions & 51 deletions

File tree

public/cui_fylr.css

Lines changed: 12 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/scss/themes/fylr/_variables.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -662,9 +662,8 @@ $drag-lasso-background: $primary !default;
662662
$sticky-header-font-size: $font-size-sm !default;
663663
$sticky-header-color: $body-color !default;
664664
$sticky-header-border-color: $hr-border-color-dark !default;
665-
$sticky-header-opacity: 0.94 !default;
666-
$sticky-header-background: rgba($body-bg, $sticky-header-opacity) !default;
667-
$sticky-header-background-pane: rgba($pane-background, $sticky-header-opacity) !default;
665+
$sticky-header-background-body: color.adjust($body-bg, $alpha: -0.06);
666+
$sticky-header-background-pane: color.adjust($pane-background, $alpha: -0.06);
668667

669668
// * Digi Display
670669
// * ==========================================

src/scss/themes/fylr/components/_map.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@
4444
left: $spacer-xs;
4545
right: $spacer-xs;
4646
display: flex;
47+
flex-wrap: wrap;
4748
justify-content: space-between;
48-
gap: $spacer-xs;
49+
gap: $spacer-sm $spacer-xs;
4950

5051
> * {
5152
pointer-events: all;

src/scss/themes/fylr/components/_sticky-header.scss

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,24 +52,37 @@
5252
}
5353

5454
.cui-sticky-header-control {
55-
display: none; // hide initially to prevent grid gap from taking effect (e.g. standard view overlay)
56-
position: sticky !important;
55+
display: none; // hide initially to prevent grid gap from taking effect (e.g. standard view overlay, compare-view)
56+
position: sticky;
57+
overflow: hidden;
5758
top: 0 !important;
5859
left: 0 !important;
60+
right: 0 !important;
61+
height: 0;
5962
width: 100% !important;
6063
z-index: 1;
61-
overflow: hidden;
6264
flex: 0 0 auto; // make sure header is visible when placed in flex-layout (see metadata-browser)
6365

6466
&:has(.cui-sticky-header) {
6567
display: block;
66-
}
68+
}
6769

6870
.cui-sticky-header {
6971
position: absolute;
7072
left: 0;
7173
right: 0;
72-
background: var(--sticky-header-background, #{$sticky-header-background});
74+
font-weight: bold;
75+
background:
76+
linear-gradient(
77+
to top,
78+
var(--sticky-header-background-from, #{$sticky-header-background-body}) 30%,
79+
var(--sticky-header-background-to, #{$body-bg}) 50%
80+
);
81+
82+
.cui-pane & {
83+
--sticky-header-background-from: #{$sticky-header-background-pane};
84+
--sticky-header-background-to: #{$pane-background};
85+
}
7386
}
7487
}
7588

src/scss/themes/fylr/mixins/_block.scss

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -121,44 +121,6 @@
121121
}
122122
}
123123

124-
// * Block Inline
125-
// - block-inline is used within base-config to lay out the block vertically in the 'inline' direction
126-
// - use when there is enough vertical space
127-
128-
// .cui-block
129-
130-
@mixin block-inline($content-indent: 200px, $content-max-width: 850px) {
131-
--block-inline-content-indent: #{$content-indent};
132-
--block-inline-content-max-width: #{$content-max-width};
133-
--block-indent: 0;
134-
135-
@include media-breakpoint-up(lg) {
136-
&:not(.cui-form-block--has-checkbox) {
137-
> .cui-block-header {
138-
margin-bottom: $block-margin;
139-
}
140-
141-
> .cui-block-content {
142-
margin-left: var(--block-inline-content-indent);
143-
max-width: var(--block-inline-content-max-width);
144-
}
145-
}
146-
}
147-
148-
// nested
149-
.cui-block {
150-
--block-inline-content-indent: 0;
151-
}
152-
153-
.cui-form-table {
154-
@include block-separator-reset();
155-
}
156-
157-
.cui-form {
158-
@include form-key-value-stacked();
159-
}
160-
}
161-
162124
@mixin disable-block-bracket() {
163125
&::before,
164126
&::after {

0 commit comments

Comments
 (0)