@esri/calcite-components
Version:
Web Components for Esri's Calcite Design System.
161 lines (131 loc) • 2.51 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);
}
}
/**
* Currently only used in Checkbox.
*/
:root {
--calcite-popper-transition: 150ms ease-in-out;
}
:host([hidden]) {
display: none;
}
:host([alignment=start]),
:host([alignment=end]) .calcite--rtl {
text-align: left;
}
:host([alignment=end]),
:host([alignment=start]) .calcite--rtl {
text-align: right;
}
:host([alignment=center]) {
text-align: center;
}
:host([scale=s]) label {
font-size: var(--calcite-font-size--2);
line-height: 1rem;
margin-bottom: 0.5rem;
}
:host([scale=m]) label {
font-size: var(--calcite-font-size--1);
line-height: 1rem;
margin-bottom: 0.75rem;
}
:host([scale=l]) label {
font-size: var(--calcite-font-size-0);
line-height: 1.25rem;
margin-bottom: 1rem;
}
:host label {
cursor: pointer;
width: 100%;
margin-top: 0;
margin-right: 0;
margin-left: 0;
line-height: 1.375;
}
:host([layout=default]) label {
display: flex;
flex-direction: column;
grid-gap: 0.25rem;
gap: 0.25rem;
}
:host([layout=inline]) label,
:host([layout=inline-space-between]) label {
display: flex;
align-items: center;
flex-direction: row;
grid-gap: 0.5rem;
gap: 0.5rem;
}
:host([layout=inline][scale=l]) label {
grid-gap: 0.75rem;
gap: 0.75rem;
}
:host([layout=inline-space-between]) label {
justify-content: space-between;
}
:host([disabled]) > label {
pointer-events: none;
opacity: var(--calcite-ui-opacity-disabled);
}
:host([disabled]) ::slotted(*) {
pointer-events: none;
}
:host([disabled]) ::slotted(*[disabled]),
:host([disabled]) ::slotted(*[disabled] *) {
--bg-opacity: 1;
}
:host([disabled]) ::slotted(calcite-input-message:not([active])) {
--bg-opacity: 0;
}
:host([status=invalid]) label {
color: var(--calcite-ui-danger);
}
:host([status=valid]) label {
color: var(--calcite-ui-text-2);
}
:host([status=idle]) label {
color: var(--calcite-ui-text-2);
}
:host([disable-spacing]) label {
grid-gap: 0;
gap: 0;
margin: 0;
}