block-section.css 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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. /**
  65. * Currently only used in Checkbox.
  66. */
  67. :root {
  68. --calcite-popper-transition: var(--calcite-animation-timing);
  69. }
  70. :host([hidden]) {
  71. display: none;
  72. }
  73. :host {
  74. box-sizing: border-box;
  75. display: block;
  76. background-color: var(--calcite-ui-foreground-1);
  77. font-size: var(--calcite-font-size--1);
  78. color: var(--calcite-ui-text-2);
  79. }
  80. :host([open]) {
  81. border-width: 0px;
  82. border-bottom-width: 1px;
  83. border-style: solid;
  84. border-bottom-color: var(--calcite-ui-border-3);
  85. }
  86. :host(:last-child) {
  87. border-bottom-width: 0px;
  88. }
  89. .toggle {
  90. width: 100%;
  91. border-width: 0px;
  92. background-color: transparent;
  93. font-family: var(--calcite-sans-family);
  94. font-weight: var(--calcite-font-weight-medium);
  95. color: var(--calcite-ui-text-2);
  96. }
  97. .toggle--switch, .section-header {
  98. margin-left: 0px;
  99. margin-right: 0px;
  100. margin-top: 0.25rem;
  101. margin-bottom: 0.25rem;
  102. display: flex;
  103. cursor: pointer;
  104. -webkit-user-select: none;
  105. user-select: none;
  106. align-items: center;
  107. padding-left: 0px;
  108. padding-right: 0px;
  109. padding-top: 0.5rem;
  110. padding-bottom: 0.5rem;
  111. font-size: var(--calcite-font-size--1);
  112. outline-offset: 0;
  113. outline-color: transparent;
  114. transition: outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;
  115. }
  116. .toggle--switch:focus, .section-header:focus {
  117. outline: 2px solid var(--calcite-ui-brand);
  118. outline-offset: 2px;
  119. }
  120. .toggle--switch:hover, .section-header:hover {
  121. color: var(--calcite-ui-text-1);
  122. }
  123. .section-header .status-icon {
  124. align-self: flex-end;
  125. }
  126. .section-header__text {
  127. margin-left: 0.75rem;
  128. margin-right: 0.75rem;
  129. margin-top: 0px;
  130. margin-bottom: 0px;
  131. flex: 1 1 auto;
  132. text-align: initial;
  133. word-wrap: anywhere;
  134. }
  135. .toggle--switch calcite-switch {
  136. pointer-events: none;
  137. margin-inline-start: 0.25rem;
  138. }
  139. .toggle--switch .status-icon {
  140. margin-inline-start: 0.5rem;
  141. }
  142. .toggle--switch__content {
  143. display: flex;
  144. flex: 1 1 auto;
  145. align-items: center;
  146. }
  147. .status-icon.valid {
  148. color: var(--calcite-ui-success);
  149. }
  150. .status-icon.invalid {
  151. color: var(--calcite-ui-danger);
  152. }