From 74d5b4c3f406b252a8f9cfd1a8b482ec4a8be5c8 Mon Sep 17 00:00:00 2001 From: konnorrogers Date: Mon, 2 Oct 2023 11:58:56 -0400 Subject: [PATCH] remove navigation button --- src/components/layout/layout.component.ts | 24 -------------------- src/components/layout/layout.styles.ts | 19 ---------------- src/components/nav-group/nav-group.styles.ts | 8 +++---- 3 files changed, 3 insertions(+), 48 deletions(-) diff --git a/src/components/layout/layout.component.ts b/src/components/layout/layout.component.ts index 2a25147fe..200a9fa5f 100644 --- a/src/components/layout/layout.component.ts +++ b/src/components/layout/layout.component.ts @@ -26,7 +26,6 @@ import type { CSSResultGroup, PropertyValueMap } from 'lit'; * @slot main-footer - Footer to display inline below the main content * @slot aside - Content to be shown on the right side of the page. Generally this may be table of contents, ads, etc. This is sticky. * @slot skip-links - If you would like to override the `Skip to main` button and add additional "Skip to X", they can be inserted here. - * @slot nav-button - For overriding the default `` displayed as the fallback on mobile viewports * @slot footer - The content to display in the footer. This is always displayed underneath the viewport so will always make the page "scrollable". * * @csspart base - The component's base wrapper. @@ -72,21 +71,11 @@ export default class WaLayout extends WebAwesomeElement { */ @property({ attribute: 'view', reflect: true }) view: 'mobile' | 'desktop' = 'mobile'; - /** - * Hides the default navigation button fallback allowing you to create your own mobile navigation experience. - */ - @property({ attribute: 'hide-nav-button', reflect: true, type: Boolean }) hideNavButton = false; - /** * At what "px" to hide the "menu" slot and collapse into a hamburger button */ @property({ attribute: 'mobile-breakpoint' }) mobileBreakpoint = 768; - /** - * Where to place the navigation when in the mobile viewport. - */ - @property({ attribute: 'navigation-placement', reflect: true }) navigationPlacement: 'start' | 'end' = 'start'; - layoutResizeObserver = new ResizeObserver(entries => { for (const entry of entries) { if (entry.contentBoxSize) { @@ -182,15 +171,6 @@ export default class WaLayout extends WebAwesomeElement { } } - private renderNavButton() { - return html` - - - - - `; - } - render() { return html` @@ -212,11 +192,7 @@ export default class WaLayout extends WebAwesomeElement {
- ${when(this.navigationPlacement === 'start', () => this.renderNavButton())} - - - ${when(this.navigationPlacement === 'end', () => this.renderNavButton())}
diff --git a/src/components/layout/layout.styles.ts b/src/components/layout/layout.styles.ts index 11e956875..d80ce31fa 100644 --- a/src/components/layout/layout.styles.ts +++ b/src/components/layout/layout.styles.ts @@ -79,21 +79,6 @@ export default css` [part~='header'] { top: var(--banner-height); - display: grid; - grid-template-columns: minmax(0, auto) minmax(0, 1fr); - align-items: center; - } - - :host([navigation-placement='end']) [part~='header'] { - grid-template-columns: minmax(0, 1fr) minmax(0, auto); - } - - :host([hide-nav-button]) [part~='nav-button'] { - display: none; - } - - :host([hide-nav-button]) [part~='header'] { - grid-template-columns: minmax(0, 1fr); } [part~='sub-header'] { @@ -161,8 +146,4 @@ export default css` grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, auto) minmax(0, 1fr) minmax(0, auto); } - - [part~='nav-button'] { - font-size: 1.5rem; - } `; diff --git a/src/components/nav-group/nav-group.styles.ts b/src/components/nav-group/nav-group.styles.ts index 9aefba0e8..5805a1427 100644 --- a/src/components/nav-group/nav-group.styles.ts +++ b/src/components/nav-group/nav-group.styles.ts @@ -9,11 +9,6 @@ export default css` --gap: 6px; } - p { - margin: 0; - margin-bottom: var(--wa-space-xs); - } - .base { color: var(--wa-color-text-normal); height: 100%; @@ -23,6 +18,9 @@ export default css` font-weight: var(--wa-font-weight-heading); color: var(--wa-color-neutral-text-on-surface); padding-inline-start: var(--wa-space-xs); + margin: 0; + /** This is a cheap way to have labels have a bottom margin withot needing slot test controllers. */ + line-height: calc(1em + 32px); } .nav-items {