Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DP-20090 menu search align #1200

Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions assets/scss/03-organisms/_header-hamburger.scss
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,12 @@ body.show-menu {
}

&-wrapper {
display: flex;
height: $utility-nav-height;

@include ma-container;

@media ($bp-medium-min) {

display: flex;
justify-content: space-between;
}

Expand All @@ -118,6 +117,7 @@ body.show-menu {
&__button-container {
display: flex;
justify-content: space-between;
width: inherit;

// Expand close button to fll the blue bar.

Expand Down Expand Up @@ -307,12 +307,11 @@ body.show-menu {
font-size: 19.2px;// Maintain the same font size regardless of the screensize.
font-weight: 700;
color: $c-font-inverse;
height: 44px;
line-height: 44px;
margin-top: 0;
padding-right: 30px;
padding-left: 20px;
transition: transform 0.5s ease;
display: flex;
align-items: center;

// Expand close button to fll the blue bar.

Expand Down Expand Up @@ -352,7 +351,10 @@ body.show-menu {
position: absolute;
transition: all 500ms ease-in-out;
width: 15px;
top: 19px;

.ios-safari-less-than-11 & {
top: 20px;
}

&:before,
&:after {
Expand Down
6 changes: 6 additions & 0 deletions changelogs/DP-20090.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Fixed:
- project: Patternlab
component: Header
description: Fixed menu icon, text, search alignment. (#1200)
issue: DP-20090
impact: Patch
14 changes: 14 additions & 0 deletions patternlab/styleguide/source/assets/js/modules/mainNavHamburger.js
Original file line number Diff line number Diff line change
Expand Up @@ -884,3 +884,17 @@ function closeSubMenu() {
openSubMenu.classList.remove("submenu-open");
}
}

// Target iOS Safari versions less than 11 to handle issues that cannot be targeted
// with behavior detection due to either buggy or idiosyncratic browser implementation
// issues addressed in later major versions.
if (osInfo.indexOf("Safari") !== -1) {
osInfo.split(" ").forEach(function(splitVar) {
if (splitVar.length > 0 && splitVar.indexOf("Version/", 0) !== false) {
let version = splitVar.match(/\d+/);
if (version !== null && version[0] < 11) {
body.classList.add("ios-safari-less-than-11");
}
}
});
}