Skip to content

Commit

Permalink
fix: multiple styling issues with DBHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget committed Jul 31, 2024
1 parent 48d1459 commit 6076142
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions packages/components/src/components/header/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
display: flex;
flex-direction: column;
position: relative;
min-block-size: component.$default-mobile-header-height;
min-block-size: component.$min-mobile-header-height;
border-block-end: variables.$db-border-height-3xs solid
colors.$db-current-color-border;

Expand Down Expand Up @@ -105,7 +105,7 @@

&::before {
position: inherit;
block-size: 100%;
block-size: variables.$db-sizing-md;
margin-inline-start: variables.$db-spacing-fixed-lg;
}
}
Expand Down Expand Up @@ -141,7 +141,7 @@
&::before {
margin-inline: variables.$db-spacing-fixed-xs;
position: inherit;
block-size: 100%;
block-size: variables.$db-sizing-md;
}
}

Expand Down Expand Up @@ -229,7 +229,7 @@
}

/* Only for Mobile */
.db-header-drawer-navigation > .db-header-meta-navigation {
.db-header-drawer-navigation > .db-header-meta-navigation:not(:empty) {
display: inherit;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
overflow-y: auto;
// additional #{$db-spacing-fixed-3xs} for border
inset-block: calc(
#{component.$default-mobile-header-height} + #{variables.$db-spacing-fixed-3xs}
#{component.$min-mobile-header-height} + #{variables.$db-spacing-fixed-3xs}
)
calc(
#{variables.$db-sizing-md} + #{variables.$db-spacing-fixed-xs} * 2 +
Expand Down
5 changes: 2 additions & 3 deletions packages/components/src/styles/_component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
@use "@db-ui/foundations/build/scss/colors";
@use "@db-ui/foundations/build/scss/helpers";

$default-mobile-header-height: var(
--db-sizing-fixed-mobile-header,
#{helpers.px-to-rem(56)}
$min-mobile-header-height: calc(
#{variables.$db-sizing-md} + 2 * #{variables.$db-spacing-fixed-xs}
);

$default-disabled: 0.4;
Expand Down
1 change: 0 additions & 1 deletion packages/foundations/scss/default-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@
--db-spacing-fixed-expressive-xl: 3rem;
--db-spacing-fixed-expressive-2xl: 5rem;
--db-spacing-fixed-expressive-3xl: 7.5rem;
--db-sizing-fixed-mobile-header: 3.5rem;
--db-sizing-regular-3xl: 15rem;
--db-sizing-regular-2xl: 10rem;
--db-sizing-regular-xl: 6rem;
Expand Down

0 comments on commit 6076142

Please sign in to comment.