@esri/calcite-components
Version:
Web Components for Esri's Calcite Design System.
208 lines (176 loc) • 3.83 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 {
max-width: 100%;
}
:host .calcite-card-container {
display: flex;
height: 100%;
flex-direction: column;
justify-content: space-between;
background-color: var(--calcite-ui-foreground-1);
transition-duration: 150ms;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
position: relative;
border-width: 1px;
border-style: solid;
border-color: var(--calcite-ui-border-2);
color: var(--calcite-ui-text-3);
box-shadow: none;
}
:host .calcite-card-container:hover {
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.08), 0 2px 8px 0 rgba(0, 0, 0, 0.04);
z-index: 1;
}
:host .calcite-card-container:active {
box-shadow: 0 1px 6px -1px rgba(0, 0, 0, 0.16), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
transition-duration: 75ms;
z-index: 1;
}
.container {
flex: 1 1 auto;
display: flex;
flex-direction: column;
}
:host([loading]) .calcite-card-container *:not(calcite-loader):not(.calcite-card-loader-container) {
opacity: 0;
pointer-events: none;
}
:host([loading]) .calcite-card-loader-container {
display: flex;
align-items: center;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.header,
.footer {
padding-top: 0.75rem;
padding-bottom: 0.25rem;
padding-left: 0.75rem;
padding-right: 0.75rem;
display: flex;
}
.header {
flex-direction: column;
}
.footer {
padding-top: 0.25rem;
padding-bottom: 0.75rem;
padding-left: 0.75rem;
padding-right: 0.75rem;
flex-direction: row;
align-content: space-between;
justify-content: space-between;
margin-top: auto;
}
.card-content {
padding: 0.75rem;
color: var(--calcite-ui-text-3);
font-size: var(--calcite-font-size--2);
line-height: 1.375;
}
:host([selectable]) .calcite-card-container:active {
box-shadow: 0 1px 6px -1px rgba(0, 0, 0, 0.16), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
}
:host([selected]) .calcite-card-container {
border-color: var(--calcite-ui-brand);
}
slot[name=title]::slotted(*),
*::slotted([slot=title]) {
font-weight: var(--calcite-font-weight-medium);
color: var(--calcite-ui-text-1);
margin: 0;
font-size: var(--calcite-font-size--1);
line-height: 1.375;
}
slot[name=subtitle]::slotted(*),
*::slotted([slot=subtitle]) {
font-weight: var(--calcite-font-weight-normal);
color: var(--calcite-ui-text-2);
margin: 0;
margin-top: 0.5rem;
font-size: var(--calcite-font-size--2);
line-height: 1.375;
}
slot[name=thumbnail]::slotted(img),
img::slotted([slot=thumbnail]) {
max-width: 100%;
min-width: 100%;
}
slot[name=footer-leading]::slotted(*),
*::slotted([slot=footer-leading]) {
align-self: center;
font-size: var(--calcite-font-size--2);
line-height: 1.375;
margin-inline-end: auto;
}
slot[name=footer-trailing]::slotted(*),
*::slotted([slot=footer-trailing]) {
align-self: center;
font-size: var(--calcite-font-size--2);
line-height: 1.375;
}
.thumbnail-wrapper {
font-size: var(--calcite-font-size-0);
line-height: 1.375;
}
.checkbox-wrapper {
position: absolute;
margin: 0;
padding: 0;
top: 0.5rem;
right: 0.5rem;
}
.calcite--rtl .checkbox-wrapper {
right: auto;
left: 0.5rem;
}