UNPKG

@synergy-design-system/components

Version:

This package provides the base of the Synergy Design System as native web components. It uses [lit](https://www.lit.dev) and parts of [shoelace](https://shoelace.style/). Synergy officially supports the latest two versions of all major browsers (as define

166 lines (127 loc) 3.53 kB
// src/components/side-nav/side-nav.styles.ts import { css } from "lit"; var side_nav_styles_default = css` :host { --side-nav-open-width: 320px; --side-nav-rail-width: 72px; display: block; } /** * Syn-drawer styling */ .side-nav__drawer { --size: var(--side-nav-open-width); } .side-nav__drawer::part(base){ position: absolute; z-index: var(--syn-z-index-drawer); } .side-nav__drawer::part(body), .side-nav__drawer::part(footer) { padding: 0; } /** * Overlay */ .side-nav__drawer::part(overlay){ position: absolute; } /**** * * variant="default" * ****/ /* Side nav should have a width, so it behave correct in an e.g. display flex context */ .side-nav.side-nav--fix.side-nav--open { width: var(--side-nav-open-width); } /* Fixed mode */ .side-nav--fix .side-nav__drawer::part(overlay){ display: block; } /**** * * variant="rail" * ****/ /* * Side nav should have a width, so it behave correct in an e.g. display flex context. * in variant="rail" the width is always the small rail width, because there should be no shrinking possible of the main content area. */ .side-nav.side-nav--rail { width: var(--side-nav-rail-width); } /* Adapt the width of the drawer */ :not(.side-nav--open).side-nav--rail .side-nav__drawer { --size: var(--side-nav-rail-width); } /* Show the overlay of the drawer on touch devices */ .side-nav--open.side-nav--rail.side-nav--touch .side-nav__drawer::part(overlay){ display: block; } /* Avoid multiline flickering on open and close animation */ .side-nav--rail.side-nav--animation { white-space: nowrap; } /* Hide the scrollbars in closed variant="rail" */ :not(.side-nav--open).side-nav--rail .side-nav__drawer::part(body){ overflow: hidden; } /**** * * variant="sticky" * ****/ /* * Side nav should have a width, so it behave correct in an e.g. display flex context. * In variant="sticky" the width is the rail width if closed and the open width if open. */ .side-nav.side-nav--sticky { width: var(--side-nav-open-width); } .side-nav.side-nav--sticky:not(.side-nav--open) { width: var(--side-nav-rail-width); } /* Adapt the width of the drawer */ :not(.side-nav--open).side-nav--sticky .side-nav__drawer { --size: var(--side-nav-rail-width); } /* * For touch devices the content should not shrink in a flex container */ .side-nav--sticky.side-nav--touch { width: var(--side-nav-rail-width); } /* Avoid multiline flickering on open and close animation */ .side-nav--sticky.side-nav--animation { white-space: nowrap; } /* Show the overlay of the drawer on touch devices */ .side-nav--open.side-nav--sticky.side-nav--touch .side-nav__drawer::part(overlay){ display: block; } /* Hide the scrollbars in closed variant="sticky" */ :not(.side-nav--open).side-nav--sticky .side-nav__drawer::part(body){ overflow: hidden; } .side-nav__toggle-icon > syn-icon { font-size: var(--syn-font-size-x-large); min-width: var(--syn-font-size-x-large); } /**** * * Footer divider * ****/ .side-nav__footer-divider{ --spacing: 0; --color: var(--syn-color-neutral-300); } :not(.side-nav--open).side-nav--rail ::slotted(syn-nav-item){ --display-children: none; } `; export { side_nav_styles_default }; //# sourceMappingURL=chunk.FWLUR33I.js.map