@esri/calcite-components
Version:
Web Components for Esri's Calcite Design System.
171 lines (151 loc) • 3.65 kB
CSS
/* mixins & extensions */
@keyframes in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes in-down {
0% {
opacity: 0;
transform: translate3D(0, -5px, 0);
}
100% {
opacity: 1;
transform: translate3D(0, 0, 0);
}
}
@keyframes in-up {
0% {
opacity: 0;
transform: translate3D(0, 5px, 0);
}
100% {
opacity: 1;
transform: translate3D(0, 0, 0);
}
}
@keyframes in-scale {
0% {
opacity: 0;
transform: scale3D(0.95, 0.95, 1);
}
100% {
opacity: 1;
transform: scale3D(1, 1, 1);
}
}
:root {
--calcite-animation-timing: calc(150ms * var(--calcite-internal-duration-factor));
--calcite-internal-duration-factor: var(--calcite-duration-factor, 1);
--calcite-internal-animation-timing-fast: calc(100ms * var(--calcite-internal-duration-factor));
--calcite-internal-animation-timing-medium: calc(200ms * var(--calcite-internal-duration-factor));
--calcite-internal-animation-timing-slow: calc(300ms * var(--calcite-internal-duration-factor));
}
.calcite-animate {
opacity: 0;
animation-fill-mode: both;
animation-duration: var(--calcite-animation-timing);
}
.calcite-animate__in {
animation-name: in;
}
.calcite-animate__in-down {
animation-name: in-down;
}
.calcite-animate__in-up {
animation-name: in-up;
}
.calcite-animate__in-scale {
animation-name: in-scale;
}
/**
* Currently only used in Checkbox.
*/
:root {
--calcite-popper-transition: var(--calcite-animation-timing);
}
:host([hidden]) {
display: none;
}
/**
* CSS Custom Properties
*
* These properties can be overridden using the component's tag as selector.
*
* @prop --calcite-input-message-spacing-value: the top margin above the input-message.
*/
:host([active][scale=m]),
:host([active][scale=l]) {
--calcite-input-message-spacing-value: 0.25rem;
}
:host {
visibility: hidden;
box-sizing: border-box;
display: flex;
height: 0px;
width: 100%;
align-items: center;
font-weight: var(--calcite-font-weight-medium);
color: var(--calcite-ui-text-1);
opacity: 0;
transition-property: all;
transition-duration: var(--calcite-animation-timing);
transition-timing-function: ease-in-out;
transition-delay: 0s;
}
:host([active]) {
visibility: visible;
height: auto;
opacity: 1;
transition-property: all;
transition-duration: var(--calcite-animation-timing);
transition-timing-function: ease-in-out;
transition-delay: 0s;
}
:host([active][scale=m]),
:host([active][scale=l]) {
margin-top: var(--calcite-input-message-spacing-value);
}
.calcite-input-message-icon {
pointer-events: none;
display: inline-flex;
flex-shrink: 0;
transition-property: all;
transition-duration: var(--calcite-animation-timing);
transition-timing-function: ease-in-out;
transition-delay: 0s;
margin-inline-end: 0.5rem;
}
:host([status=invalid]) .calcite-input-message-icon {
color: var(--calcite-ui-danger);
}
:host([status=warning]) .calcite-input-message-icon {
color: var(--calcite-ui-warning);
}
:host([status=valid]) .calcite-input-message-icon {
color: var(--calcite-ui-success);
}
:host([status=idle]) .calcite-input-message-icon {
color: var(--calcite-ui-brand);
}
:host([status][active]) {
font-weight: var(--calcite-font-weight-medium);
color: var(--calcite-ui-text-1);
}
:host([status][active][scale=s]) {
font-size: var(--calcite-font-size--3);
line-height: 0.75rem;
}
:host([status][active][scale=m]) {
margin-top: 0.25rem;
font-size: var(--calcite-font-size--2);
line-height: 1rem;
}
:host([status][active][scale=l]) {
margin-top: 0.25rem;
font-size: var(--calcite-font-size--1);
line-height: 1rem;
}