-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add Menu button in new header variant #3478
base: main
Are you sure you want to change the base?
Changes from all commits
595562b
46c876b
445872a
5546dfb
fc8dfc9
1af164e
467e713
70e9b03
4d4c072
10f6b7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -431,7 +431,8 @@ $button-shadow-size: 3px; | |
} | ||
|
||
&--mobile[aria-expanded='true'], | ||
&--text-link[aria-expanded='true'] { | ||
&--text-link[aria-expanded='true'], | ||
&--menu[aria-expanded='true'] { | ||
.ons-icon { | ||
transform: rotate(270deg); | ||
} | ||
|
@@ -551,6 +552,91 @@ $button-shadow-size: 3px; | |
} | ||
} | ||
} | ||
|
||
&--menu { | ||
align-items: center; | ||
display: flex; | ||
height: 67px; | ||
padding: 0 1.5rem; | ||
border-bottom: 4px solid rgb(0 0 0 / 0%); | ||
@include mq(l) { | ||
height: 72px; | ||
} | ||
.ons-icon { | ||
transform: rotate(90deg); | ||
} | ||
} | ||
|
||
&--menu & { | ||
&__inner { | ||
background: rgb(0 0 0 / 0%); | ||
border: 0; | ||
border-radius: 0; | ||
Comment on lines
+573
to
+574
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need these? |
||
box-shadow: none; | ||
color: var(--ons-color-text-link); | ||
font-weight: 700; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is already being set with the |
||
padding: 0; | ||
.ons-icon { | ||
fill: var(--ons-color-text-link); | ||
height: 1rem; | ||
margin-top: 0; | ||
width: 1rem; | ||
} | ||
} | ||
} | ||
|
||
&--menu:focus { | ||
background-color: var(--ons-color-focus); | ||
border-color: var(--ons-color-black); | ||
} | ||
|
||
&--menu:hover { | ||
border-color: var(--ons-color-text-link-hover); | ||
} | ||
|
||
&--menu:focus & { | ||
&__inner { | ||
background: none; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesnt need to be set |
||
box-shadow: none; | ||
} | ||
} | ||
|
||
&--menu:focus:hover:not(:active, .active) { | ||
.ons-btn__inner { | ||
background: none; | ||
} | ||
} | ||
|
||
&--menu:active, | ||
&--menu[aria-expanded='true'] { | ||
background-color: var(--ons-color-branded-tint); | ||
border-color: var(--ons-color-text-link-hover); | ||
} | ||
|
||
&--menu:hover &, | ||
&--menu:active &, | ||
&--menu.active & { | ||
&__inner { | ||
background: none; | ||
color: var(--ons-color-text-link-hover); | ||
.ons-icon { | ||
fill: var(--ons-color-text-link-hover); | ||
} | ||
} | ||
} | ||
|
||
&--menu:active &, | ||
&--menu:active:focus &, | ||
&--menu.active &, | ||
&--menu.active:focus & { | ||
&__inner { | ||
background: none; | ||
color: var(--ons-color-text-link-hover); | ||
.ons-icon { | ||
fill: var(--ons-color-text-link-hover); | ||
} | ||
} | ||
} | ||
} | ||
|
||
.ons-search__btn { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,6 +236,50 @@ | |
} | ||
} | ||
|
||
&--basic & { | ||
&__grid-top { | ||
padding: 0; | ||
} | ||
} | ||
|
||
&-nav-menu { | ||
background-color: var(--ons-color-branded-tint); | ||
margin-bottom: 1rem; | ||
padding-top: 2.5rem; | ||
Comment on lines
+247
to
+248
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can extend utility classes here |
||
width: 100%; | ||
|
||
&__key-list { | ||
border-bottom: 1px solid var(--ons-color-ocean-blue); | ||
margin-bottom: 1.25rem; | ||
padding-bottom: 1rem; | ||
padding-left: 0; | ||
row-gap: 1rem; | ||
} | ||
|
||
&__link, | ||
&__heading, | ||
&__text, | ||
&__description { | ||
line-height: 1.714 !important; | ||
} | ||
|
||
&__child-list { | ||
margin-bottom: 2rem !important; | ||
} | ||
|
||
.ons-grid { | ||
margin-left: 0; | ||
} | ||
|
||
.ons-grid__col { | ||
padding-left: 0; | ||
padding-bottom: 1rem; | ||
@include mq(m) { | ||
padding-bottom: 0; | ||
} | ||
} | ||
} | ||
|
||
.ons-btn { | ||
top: 0 !important; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should avoid setting the height like this. Find out how the height is set on the header and see if you can inherit that