input-containerpackage.src.vaadin-input-container-styles.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) 2021 - 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 inputContainerStyles = css`
:host {
display: flex;
align-items: center;
flex: 0 1 auto;
border-radius:
/* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius */
var(--vaadin-input-field-top-start-radius, var(--__border-radius))
var(--vaadin-input-field-top-end-radius, var(--__border-radius))
var(--vaadin-input-field-bottom-end-radius, var(--__border-radius))
var(--vaadin-input-field-bottom-start-radius, var(--__border-radius));
--_border-radius: var(--vaadin-input-field-border-radius, 0);
--_input-border-width: var(--vaadin-input-field-border-width, 0);
--_input-border-color: var(--vaadin-input-field-border-color, transparent);
box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
}
:host([dir='rtl']) {
border-radius:
/* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
var(--vaadin-input-field-top-end-radius, var(--_border-radius))
var(--vaadin-input-field-top-start-radius, var(--_border-radius))
var(--vaadin-input-field-bottom-start-radius, var(--_border-radius))
var(--vaadin-input-field-bottom-end-radius, var(--_border-radius));
}
:host([hidden]) {
display: none !important;
}
/* Reset the native input styles */
::slotted(input) {
-webkit-appearance: none;
-moz-appearance: none;
flex: auto;
white-space: nowrap;
overflow: hidden;
width: 100%;
height: 100%;
outline: none;
margin: 0;
padding: 0;
border: 0;
border-radius: 0;
min-width: 0;
font: inherit;
line-height: normal;
color: inherit;
background-color: transparent;
/* Disable default invalid style in Firefox */
box-shadow: none;
}
::slotted(*) {
flex: none;
}
::slotted(:is(input, textarea))::placeholder {
/* Use ::slotted(input:placeholder-shown) in themes to style the placeholder. */
/* because ::slotted(...)::placeholder does not work in Safari. */
font: inherit;
color: inherit;
/* Override default opacity in Firefox */
opacity: 1;
}
`;