buttonpackage.src.vaadin-button-base.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vaadin-webcomponents Show documentation
Show all versions of vaadin-webcomponents Show documentation
Mvnpm composite: Vaadin webcomponents
The newest version!
/**
* @license
* Copyright (c) 2017 - 2024 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
import { css } from 'lit';
export const buttonStyles = css`
:host {
display: inline-block;
position: relative;
outline: none;
white-space: nowrap;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
:host([hidden]) {
display: none !important;
}
/* Aligns the button with form fields when placed on the same line.
Note, to make it work, the form fields should have the same "::before" pseudo-element. */
.vaadin-button-container::before {
content: '\\2003';
display: inline-block;
width: 0;
max-height: 100%;
}
.vaadin-button-container {
display: inline-flex;
align-items: center;
justify-content: center;
text-align: center;
width: 100%;
height: 100%;
min-height: inherit;
text-shadow: inherit;
}
[part='prefix'],
[part='suffix'] {
flex: none;
}
[part='label'] {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
@media (forced-colors: active) {
:host {
outline: 1px solid;
outline-offset: -1px;
}
:host([focused]) {
outline-width: 2px;
}
:host([disabled]) {
outline-color: GrayText;
}
}
`;
export const buttonTemplate = (html) => html`
`;