tile.css 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. /* mixins & extensions */
  2. @keyframes in {
  3. 0% {
  4. opacity: 0;
  5. }
  6. 100% {
  7. opacity: 1;
  8. }
  9. }
  10. @keyframes in-down {
  11. 0% {
  12. opacity: 0;
  13. transform: translate3D(0, -5px, 0);
  14. }
  15. 100% {
  16. opacity: 1;
  17. transform: translate3D(0, 0, 0);
  18. }
  19. }
  20. @keyframes in-up {
  21. 0% {
  22. opacity: 0;
  23. transform: translate3D(0, 5px, 0);
  24. }
  25. 100% {
  26. opacity: 1;
  27. transform: translate3D(0, 0, 0);
  28. }
  29. }
  30. @keyframes in-scale {
  31. 0% {
  32. opacity: 0;
  33. transform: scale3D(0.95, 0.95, 1);
  34. }
  35. 100% {
  36. opacity: 1;
  37. transform: scale3D(1, 1, 1);
  38. }
  39. }
  40. :root {
  41. --calcite-animation-timing: calc(150ms * var(--calcite-internal-duration-factor));
  42. --calcite-internal-duration-factor: var(--calcite-duration-factor, 1);
  43. --calcite-internal-animation-timing-fast: calc(100ms * var(--calcite-internal-duration-factor));
  44. --calcite-internal-animation-timing-medium: calc(200ms * var(--calcite-internal-duration-factor));
  45. --calcite-internal-animation-timing-slow: calc(300ms * var(--calcite-internal-duration-factor));
  46. }
  47. .calcite-animate {
  48. opacity: 0;
  49. animation-fill-mode: both;
  50. animation-duration: var(--calcite-animation-timing);
  51. }
  52. .calcite-animate__in {
  53. animation-name: in;
  54. }
  55. .calcite-animate__in-down {
  56. animation-name: in-down;
  57. }
  58. .calcite-animate__in-up {
  59. animation-name: in-up;
  60. }
  61. .calcite-animate__in-scale {
  62. animation-name: in-scale;
  63. }
  64. @media (prefers-reduced-motion: reduce) {
  65. :root {
  66. --calcite-internal-duration-factor: 0.01;
  67. }
  68. }
  69. /**
  70. * Currently only used in Checkbox.
  71. */
  72. :root {
  73. --calcite-floating-ui-transition: var(--calcite-animation-timing);
  74. }
  75. :host([hidden]) {
  76. display: none;
  77. }
  78. :host([disabled]) {
  79. pointer-events: none;
  80. cursor: default;
  81. -webkit-user-select: none;
  82. user-select: none;
  83. opacity: var(--calcite-ui-opacity-disabled);
  84. }
  85. :host {
  86. box-sizing: border-box;
  87. display: inline-block;
  88. -webkit-user-select: none;
  89. user-select: none;
  90. background-color: var(--calcite-ui-foreground-1);
  91. color: var(--calcite-ui-text-3);
  92. transition-duration: 150ms;
  93. transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  94. }
  95. :host .container {
  96. pointer-events: none;
  97. display: grid;
  98. grid-template-columns: repeat(1, minmax(0, 1fr));
  99. gap: 0.5rem;
  100. }
  101. :host .content {
  102. display: flex;
  103. flex: 1 1 auto;
  104. flex-direction: column;
  105. justify-content: center;
  106. gap: 0.5rem;
  107. inline-size: 10%;
  108. }
  109. :host .content-container {
  110. display: flex;
  111. inline-size: 100%;
  112. flex: 1 1 auto;
  113. align-items: stretch;
  114. padding: 0px;
  115. color: var(--calcite-ui-text-2);
  116. outline-color: transparent;
  117. }
  118. :host .content-slot-container {
  119. display: flex;
  120. align-items: center;
  121. background-color: var(--calcite-ui-foreground-1);
  122. }
  123. :host .content-slot-container:first-child {
  124. padding-inline: 0 0.75rem;
  125. }
  126. :host .content-slot-container:last-child {
  127. padding-inline: 0.75rem 0;
  128. }
  129. :host .heading {
  130. pointer-events: none;
  131. overflow-wrap: break-word;
  132. font-size: var(--calcite-font-size--1);
  133. line-height: 1.375;
  134. font-weight: var(--calcite-font-weight-medium);
  135. color: var(--calcite-ui-text-2);
  136. transition-duration: 150ms;
  137. transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  138. }
  139. :host .large-visual {
  140. align-items: center;
  141. text-align: center;
  142. min-block-size: 12rem;
  143. }
  144. :host .large-visual .icon {
  145. display: flex;
  146. justify-content: center;
  147. align-self: flex-end;
  148. }
  149. :host .large-visual .content-container {
  150. align-self: center;
  151. }
  152. :host .description {
  153. pointer-events: none;
  154. overflow-wrap: break-word;
  155. font-size: var(--calcite-font-size--2);
  156. line-height: 1.375;
  157. color: var(--calcite-ui-text-3);
  158. transition-duration: 150ms;
  159. transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  160. }
  161. :host(:not([embed])) {
  162. padding: 0.75rem;
  163. box-shadow: 0 0 0 1px var(--calcite-ui-border-2);
  164. }
  165. :host(:not([embed])[href]:hover) {
  166. cursor: pointer;
  167. box-shadow: 0 0 0 2px var(--calcite-ui-brand);
  168. }
  169. :host(:not([embed])[href]:active) {
  170. box-shadow: 0 0 0 3px var(--calcite-ui-brand);
  171. }
  172. :host([icon][heading]:not([description]):not([embed])) {
  173. padding: 0px;
  174. }
  175. :host([icon][heading]:not([description])) .icon {
  176. display: flex;
  177. justify-content: center;
  178. }
  179. :host([icon][heading]:not([description])) .large-visual {
  180. text-align: center;
  181. }
  182. :host([disabled]) ::slotted([calcite-hydrated][disabled]),
  183. :host([disabled]) [calcite-hydrated][disabled] {
  184. /* prevent opacity stacking */
  185. opacity: 1;
  186. }
  187. :host(:hover) .heading,
  188. :host([active]) .heading {
  189. color: var(--calcite-ui-text-1);
  190. }
  191. :host(:hover) .description,
  192. :host([active]) .description {
  193. color: var(--calcite-ui-text-2);
  194. }