@esri/calcite-components
Version:
Web Components for Esri's Calcite Design System.
207 lines (175 loc) • 3.81 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 {
flex: 0 1 auto;
outline: none;
margin-right: 1.25rem;
margin-inline-start: 0;
margin-inline-end: 1.25rem;
}
:host-context([dir=rtl]) {
margin-right: 0;
margin-left: 1.25rem;
}
:host-context([theme=dark]) {
--calcite-ui-blue-1: #00A0FF;
--calcite-ui-blue-2: #0087D7;
--calcite-ui-blue-3: #47BBFF;
--calcite-ui-green-1: #36DA43;
--calcite-ui-green-2: #11AD1D;
--calcite-ui-green-3: #44ED51;
--calcite-ui-yellow-1: #FFC900;
--calcite-ui-yellow-2: #F4B000;
--calcite-ui-yellow-3: #FFE24D;
--calcite-ui-red-1: #FE583E;
--calcite-ui-red-2: #F3381B;
--calcite-ui-red-3: #FF7465;
--calcite-ui-background: #202020;
--calcite-ui-foreground-1: #2b2b2b;
--calcite-ui-foreground-2: #353535;
--calcite-ui-foreground-3: #404040;
--calcite-ui-text-1: #ffffff;
--calcite-ui-text-2: #bfbfbf;
--calcite-ui-text-3: #9f9f9f;
--calcite-ui-border-1: #4a4a4a;
--calcite-ui-border-2: #404040;
--calcite-ui-border-3: #353535;
--calcite-ui-border-4: #757575;
--calcite-ui-border-5: #9f9f9f;
}
:host([layout=center]) {
flex-basis: 200px;
text-align: center;
margin: 0 1.25rem;
}
:host([position=below]) a {
border-bottom: 0;
border-top: 3px solid transparent;
}
:host a {
outline-offset: 0;
outline-color: transparent;
transition: outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;
}
:host(:focus) a {
outline: 2px solid var(--calcite-ui-blue-1);
outline-offset: 2px;
}
:host(:active) a,
:host(:focus) a,
:host(:hover) a {
text-decoration: none;
color: var(--calcite-ui-text-1);
border-color: var(--calcite-ui-border-2);
}
:host([active]) a {
color: var(--calcite-ui-text-1);
border-color: transparent;
}
:host([disabled]) {
pointer-events: none;
}
:host([disabled]) span,
:host([disabled]) a {
pointer-events: none;
opacity: var(--calcite-ui-opacity-disabled);
}
a,
span {
box-sizing: border-box;
font-size: 0.875rem;
line-height: 1.5;
padding: 0.75rem 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
border-bottom: 3px solid transparent;
-webkit-appearance: none;
cursor: pointer;
transition: 150ms ease-in-out;
color: var(--calcite-ui-text-3);
width: 100%;
height: 100%;
display: flex;
justify-content: center;
}
span {
cursor: default;
}
.calcite-tab-title--icon {
display: inline-flex;
position: relative;
margin: 0;
line-height: inherit;
align-self: center;
}
.calcite-tab-title--icon svg {
transition: 150ms ease-in-out;
}
:host([hastext]) .calcite-tab-title--icon.icon-start {
margin-right: 0.5rem;
}
:host([hastext][dir=rtl]) .calcite-tab-title--icon.icon-start {
margin-right: 0;
margin-left: 0.5rem;
}
:host([hastext]) .calcite-tab-title--icon.icon-end {
margin-left: 0.5rem;
}
:host([hastext][dir=rtl]) .calcite-tab-title--icon.icon-end {
margin-left: 0;
margin-right: 0.5rem;
}
:host([icon-start][icon-end]) .calcite-tab-title--icon:first-child {
margin-right: 0.5rem;
}
:host([icon-start][icon-end][dir=rtl]) .calcite-tab-title--icon:first-child {
margin-right: 0;
margin-left: 0.5rem;
}