shell.css 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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. :host {
  73. /* Base ":host" styles for the component */
  74. box-sizing: border-box;
  75. background-color: var(--calcite-ui-foreground-1);
  76. color: var(--calcite-ui-text-2);
  77. font-size: var(--calcite-font-size--1);
  78. }
  79. :host * {
  80. box-sizing: border-box;
  81. }
  82. :root {
  83. --calcite-floating-ui-transition: var(--calcite-animation-timing);
  84. }
  85. :host([hidden]) {
  86. display: none;
  87. }
  88. /**
  89. * CSS Custom Properties
  90. *
  91. * These properties can be overridden using the component's tag as selector.
  92. *
  93. * @prop --calcite-shell-tip-spacing: The left and right spacing of the `calcite-tip-manager` when slotted in the component.
  94. */
  95. :host {
  96. position: absolute;
  97. inset: 0px;
  98. display: flex;
  99. block-size: 100%;
  100. inline-size: 100%;
  101. flex-direction: column;
  102. overflow: hidden;
  103. --calcite-shell-tip-spacing: 26vw;
  104. }
  105. .main {
  106. position: relative;
  107. display: flex;
  108. block-size: 100%;
  109. inline-size: 100%;
  110. flex: 1 1 auto;
  111. flex-direction: row;
  112. justify-content: space-between;
  113. overflow: hidden;
  114. }
  115. .main--reversed {
  116. flex-direction: row-reverse;
  117. }
  118. .content {
  119. display: flex;
  120. block-size: 100%;
  121. inline-size: 100%;
  122. flex-direction: column;
  123. flex-wrap: nowrap;
  124. overflow: auto;
  125. }
  126. .content ::slotted(calcite-shell-center-row),
  127. .content ::slotted(calcite-panel),
  128. .content ::slotted(calcite-flow) {
  129. flex: 1 1 auto;
  130. align-self: stretch;
  131. max-block-size: unset;
  132. }
  133. .content--behind {
  134. position: absolute;
  135. inset: 0px;
  136. border-width: 0px;
  137. z-index: calc(1 - 1);
  138. display: initial;
  139. }
  140. ::slotted(calcite-shell-center-row) {
  141. inline-size: unset;
  142. }
  143. ::slotted(.header .heading) {
  144. font-size: var(--calcite-font-size--2);
  145. line-height: 1.375;
  146. font-weight: var(--calcite-font-weight-normal);
  147. }
  148. slot[name=panel-end]::slotted(calcite-shell-panel) {
  149. margin-inline-start: auto;
  150. }
  151. ::slotted(calcite-shell-panel),
  152. ::slotted(calcite-shell-center-row) {
  153. position: relative;
  154. z-index: 1;
  155. }
  156. ::slotted(calcite-panel),
  157. ::slotted(calcite-flow) {
  158. border-width: 1px;
  159. border-inline-start-width: 0px;
  160. border-inline-end-width: 0px;
  161. border-style: solid;
  162. border-color: var(--calcite-ui-border-3);
  163. }
  164. slot[name=center-row]::slotted(calcite-shell-center-row:not([detached])) {
  165. border-inline-start-width: 1px;
  166. border-inline-end-width: 1px;
  167. border-color: var(--calcite-ui-border-3);
  168. }
  169. ::slotted(calcite-tip-manager) {
  170. position: absolute;
  171. z-index: 500;
  172. box-sizing: border-box;
  173. }
  174. @keyframes in-up {
  175. 0% {
  176. opacity: 0;
  177. transform: translate3D(0, 5px, 0);
  178. }
  179. 100% {
  180. opacity: 1;
  181. transform: translate3D(0, 0, 0);
  182. }
  183. }
  184. ::slotted(calcite-tip-manager) {
  185. animation: in-up var(--calcite-internal-animation-timing-slow) ease-in-out;
  186. border-radius: 0.25rem;
  187. --tw-shadow: 0 6px 20px -4px rgba(0, 0, 0, 0.1), 0 4px 12px -2px rgba(0, 0, 0, 0.08);
  188. --tw-shadow-colored: 0 6px 20px -4px var(--tw-shadow-color), 0 4px 12px -2px var(--tw-shadow-color);
  189. box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
  190. inset-block-end: 0.5rem;
  191. inset-inline: var(--calcite-shell-tip-spacing);
  192. }