@vaadin/field-base
Version:
Vaadin field base mixins
43 lines (37 loc) • 969 B
JavaScript
/**
* @license
* Copyright (c) 2021 - 2025 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
import { css } from 'lit';
export const field = css`
:host {
display: inline-flex;
outline: none;
}
:host::before {
content: '\\2003';
width: 0;
display: inline-block;
/* Size and position this element on the same vertical position as the input-field element
to make vertical align for the host element work as expected */
}
:host([hidden]) {
display: none ;
}
:host(:not([has-label])) [part='label'] {
display: none;
}
@media (forced-colors: active) {
:host(:not([readonly])) [part='input-field'] {
outline: 1px solid;
outline-offset: -1px;
}
:host([focused]) [part='input-field'] {
outline-width: 2px;
}
:host([disabled]) [part='input-field'] {
outline-color: GrayText;
}
}
`;