Skip to content

Commit

Permalink
fix: restructure menu header for styling
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Sep 26, 2024
1 parent 78c3032 commit cc4b980
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions src/js/menu/media-chrome-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,16 @@ template.innerHTML = /*html*/ `
transform: translate(-100%, 0);
}
slot[name="header"] {
display: flex;
slot[name="header"][hidden] {
display: none;
}
slot[name="header"]::slotted(*) {
padding: .4em .7em;
border-bottom: 1px solid rgb(255 255 255 / .25);
cursor: default;
}
slot[name="header"][hidden] {
display: none;
}
button[part~="back"] {
background: none;
color: inherit;
Expand Down Expand Up @@ -197,7 +196,7 @@ template.innerHTML = /*html*/ `
</style>
<style id="layout-row" media="width:0">
slot[name="header"] {
slot[name="header"]::slotted(*) {
padding: .4em .5em;
}
Expand All @@ -222,14 +221,16 @@ template.innerHTML = /*html*/ `
</style>
<div id="container">
<slot name="header" hidden>
<button part="back button" aria-label="Back to previous menu">
<slot name="back-icon">
<svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator">
<path d="m11.88 17.585.742-.669-4.2-4.665 4.2-4.666-.743-.669-4.803 5.335 4.803 5.334Z"/>
</svg>
</slot>
<slot name="title"></slot>
</button>
<div>
<button part="back button" aria-label="Back to previous menu">
<slot name="back-icon">
<svg aria-hidden="true" viewBox="0 0 20 24" part="back indicator">
<path d="m11.88 17.585.742-.669-4.2-4.665 4.2-4.666-.743-.669-4.803 5.335 4.803 5.334Z"/>
</svg>
</slot>
<slot name="title"></slot>
</button>
</div>
</slot>
<slot></slot>
</div>
Expand Down

0 comments on commit cc4b980

Please sign in to comment.