UNPKG

@vaadin/vaadin-lumo-styles

Version:

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

55 lines (46 loc) 1.19 kB
/** * @license * Copyright (c) 2022 - 2025 Vaadin Ltd. * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ */ import '../color.js'; import '../sizing.js'; import { css } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; const loader = css` [part~='loader'] { box-sizing: border-box; width: var(--lumo-icon-size-s); height: var(--lumo-icon-size-s); border: 2px solid transparent; border-color: var(--lumo-primary-color-10pct) var(--lumo-primary-color-10pct) var(--lumo-primary-color) var(--lumo-primary-color); border-radius: calc(0.5 * var(--lumo-icon-size-s)); opacity: 0; pointer-events: none; } :host(:not([loading])) [part~='loader'] { display: none; } :host([loading]) [part~='loader'] { animation: 1s linear infinite lumo-loader-rotate, 0.3s 0.1s lumo-loader-fade-in both; } @keyframes lumo-loader-fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes lumo-loader-rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } `; export { loader };