@logo-elements/logo-elements-styles
Version:
Logo Elements Design System is a design system library for modern web applications which gives your web apps Logo Applications look and feel, used by Logo Elements
68 lines (57 loc) • 1.84 kB
JavaScript
/**
* @license
* Copyright LOGO YAZILIM SANAYİ VE TİCARET A.Ş.
*
* Save to the extent permitted by law, you may not use, copy, modify,
* distribute or create derivative works of this material or any part
* of it without the prior written consent of LOGO YAZILIM SANAYİ VE TİCARET A.Ş. Limited.
* Any reproduction of this material must contain this notice.
*/
import { css } from '@vaadin/vaadin-themable-mixin/register-styles.js';
import '../color.js';
import '../sizing.js';
import '../style.js';
import '../typography.js';
export const helper = css`
:host([has-helper]) [part='helper-text']::before {
content: '';
display: block;
height: 0.4em;
}
[part='helper-text'] {
display: block;
color: var(--leds-secondary-text-color);
font-size: var(--leds-font-size-xs);
line-height: var(--leds-line-height-xs);
margin-left: calc(var(--leds-border-radius-m) / 4);
transition: color 0.2s;
}
:host(:hover:not([readonly])) [part='helper-text'] {
color: var(--leds-body-text-color);
}
:host([disabled]) [part='helper-text'] {
color: var(--leds-disabled-text-color);
-webkit-text-fill-color: var(--leds-disabled-text-color);
}
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {
display: none;
}
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {
content: '';
display: block;
height: 0.4em;
}
:host([has-helper][theme~='helper-above-field']) [part='label'] {
order: 0;
padding-bottom: 0.4em;
}
:host([has-helper][theme~='helper-above-field']) [part='helper-text'] {
order: 1;
}
:host([has-helper][theme~='helper-above-field']) [part='label'] + * {
order: 2;
}
:host([has-helper][theme~='helper-above-field']) [part='error-message'] {
order: 3;
}
`;