Skip to content

Commit

Permalink
fix(header): hero text going over the logo and menu on mobile resolut…
Browse files Browse the repository at this point in the history
…ions

- changed the implementation to use a negative margin with size of
  the height of the eea header instead of absolute position since it's changed
  from mobile to tablet to desktop, this way we avoid the text running over the
  frontpage menu
  • Loading branch information
ichim-david committed Oct 14, 2022
1 parent 64677ad commit 1434508
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 1 addition & 2 deletions theme/themes/eea/extras/custom.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
font-size: @h1;
}

// remove margin and padding from homepage content-area since we have the bg image over the header
// remove padding from homepage content-area since we have the bg image over the header
.homepage .content-area {
margin-top: 0 !important;
padding-top: 0 !important;
}

Expand Down
14 changes: 12 additions & 2 deletions theme/themes/eea/extras/header.less
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,15 @@
}

@media all and (max-width: @largestMobileScreen) {
.homepage .content-area {
margin-top: -@mobileMainSectionHeight;
}
.eea.header .top.bar .ui.container {
width: 100% !important; //override semantic auto to display content with space between them
}
}
.homepage .eea.header {
position: absolute;
top: 0;
position: relative;
z-index: 1;
width: 100%;
}
Expand Down Expand Up @@ -472,6 +474,10 @@
margin-top: @tabletLogoMarginTop;
}

.homepage .content-area {
margin-top: -@tabletMainSectionHeight !important;
}

/* Search box */
#search-box {
height: @tabletPopUpHeight;
Expand Down Expand Up @@ -563,6 +569,10 @@
margin-top: @computerLogoMarginTop;
}

.homepage .content-area {
margin-top: -@computerMainSectionHeight !important;
}

/* Search box */
#search-box {
height: @computerPopUpHeight;
Expand Down

0 comments on commit 1434508

Please sign in to comment.