UNPKG

@vaadin/vaadin-lumo-styles

Version:

Lumo is a design system foundation for modern web applications, used by Vaadin components

184 lines (154 loc) 4.2 kB
/** * @license * Copyright (c) 2000 - 2026 Vaadin Ltd. * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ */ @media lumo_components_side-nav-item { :host { display: block; --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct)); --_focus-ring-width: var(--vaadin-focus-ring-width, 2px); } :host([hidden]), [hidden] { display: none !important; } :host([disabled]) { pointer-events: none; } [part='content'] { display: flex; align-items: center; } [part='link'] { flex: auto; min-width: 0; display: flex; align-items: center; text-decoration: none; color: inherit; font: inherit; width: 100%; gap: var(--lumo-space-xs); padding: var(--lumo-space-s); padding-inline-start: calc(var(--lumo-space-s) + var(--_child-indent, 0px)); border-radius: var(--lumo-border-radius-m); transition: background-color 140ms, color 140ms; cursor: var(--lumo-clickable-cursor, default); min-height: var(--lumo-icon-size-m); } button { appearance: none; flex: none; position: relative; margin: 0; padding: 0; border: 0; background: transparent; } [part='children'] { padding: 0; margin: 0; list-style-type: none; } :host(:not([has-children])) button { display: none !important; } slot[name='prefix'], slot[name='suffix'] { flex: none; } slot:not([name]) { display: block; flex: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0 var(--lumo-space-s); } [part='link'][href] { cursor: pointer; } :host([disabled]) [part='link'] { color: var(--lumo-disabled-text-color); } [part='toggle-button'] { margin-inline-end: calc(var(--lumo-space-xs) * -1); width: var(--lumo-size-s); height: var(--lumo-size-s); } :host([has-children]) [part='content'] { padding-inline-end: var(--lumo-space-s); } @media (any-hover: hover) { [part='link']:hover { color: var(--lumo-header-text-color); } [part='toggle-button']:hover { color: var(--lumo-body-text-color); } } [part='link']:active:focus { background-color: var(--lumo-contrast-5pct); } [part='toggle-button']::before { content: var(--lumo-icons-dropdown); transform: rotate(-90deg); transition: transform 140ms; } :host([dir='rtl']) [part='toggle-button']::before { transform: rotate(90deg); } :host([expanded]) [part='toggle-button']::before { transform: none; } [part='link'], [part='toggle-button'] { outline: none; } [part='link']:focus-visible, [part='toggle-button']:focus-visible { border-radius: var(--lumo-border-radius-m); box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color); } [part='link']:active { color: var(--lumo-header-text-color); } slot[name='prefix']::slotted(:is(vaadin-icon, [class*='icon'])) { padding: 0.1em; flex-shrink: 0; color: var(--lumo-contrast-60pct); } :host([disabled]) slot[name='prefix']::slotted(:is(vaadin-icon, [class*='icon'])) { color: var(--lumo-disabled-text-color); } :host([current]) slot[name='prefix']::slotted(:is(vaadin-icon, [class*='icon'])) { color: inherit; } slot[name='children'] { --_child-indent: calc(var(--_child-indent-2, 0px) + var(--vaadin-side-nav-child-indent, var(--lumo-space-l))); } slot[name='children']::slotted(*) { --_child-indent-2: var(--_child-indent); } :host([current]) [part='content'] { background-color: var(--lumo-primary-color-10pct); color: var(--vaadin-selection-color-text, var(--lumo-primary-text-color)); border-radius: var(--lumo-border-radius-m); } .sr-only { border: 0 !important; clip: rect(1px, 1px, 1px, 1px) !important; clip-path: inset(50%) !important; height: 1px !important; margin: -1px !important; overflow: hidden !important; padding: 0 !important; position: absolute !important; width: 1px !important; white-space: nowrap !important; } }