VExpansionPanel.css 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. .v-expansion-panel {
  2. background-color: rgb(var(--v-theme-surface));
  3. color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
  4. }
  5. .v-expansion-panel:not(:first-child)::after {
  6. border-color: rgba(var(--v-border-color), var(--v-border-opacity));
  7. }
  8. .v-expansion-panel--disabled .v-expansion-panel-title {
  9. color: rgba(var(--v-theme-on-surface), 0.26);
  10. }
  11. .v-expansion-panel--disabled .v-expansion-panel-title .v-expansion-panel-title__overlay {
  12. opacity: 0.4615384615;
  13. }
  14. .v-expansion-panels {
  15. display: flex;
  16. flex-wrap: wrap;
  17. justify-content: center;
  18. list-style-type: none;
  19. padding: 0;
  20. width: 100%;
  21. position: relative;
  22. z-index: 1;
  23. }
  24. .v-expansion-panels:not(.v-expansion-panels--variant-accordion) > :not(:first-child):not(:last-child):not(.v-expansion-panel--active):not(.v-expansion-panel--before-active) {
  25. border-bottom-left-radius: 0 !important;
  26. border-bottom-right-radius: 0 !important;
  27. }
  28. .v-expansion-panels:not(.v-expansion-panels--variant-accordion) > :not(:first-child):not(:last-child):not(.v-expansion-panel--active):not(.v-expansion-panel--after-active) {
  29. border-top-left-radius: 0 !important;
  30. border-top-right-radius: 0 !important;
  31. }
  32. .v-expansion-panels:not(.v-expansion-panels--variant-accordion) > :first-child:not(:last-child):not(.v-expansion-panel--active):not(.v-expansion-panel--before-active) {
  33. border-bottom-left-radius: 0 !important;
  34. border-bottom-right-radius: 0 !important;
  35. }
  36. .v-expansion-panels:not(.v-expansion-panels--variant-accordion) > :last-child:not(:first-child):not(.v-expansion-panel--active):not(.v-expansion-panel--after-active) {
  37. border-top-left-radius: 0 !important;
  38. border-top-right-radius: 0 !important;
  39. }
  40. .v-expansion-panels--variant-accordion > :first-child {
  41. border-bottom-left-radius: 0 !important;
  42. border-bottom-right-radius: 0 !important;
  43. }
  44. .v-expansion-panels--variant-accordion > :last-child {
  45. border-top-left-radius: 0 !important;
  46. border-top-right-radius: 0 !important;
  47. }
  48. .v-expansion-panels--variant-accordion > :last-child .v-expansion-panel-title--active {
  49. border-bottom-left-radius: initial;
  50. border-bottom-right-radius: initial;
  51. }
  52. .v-expansion-panels--variant-accordion > :not(:first-child):not(:last-child) {
  53. border-radius: 0 !important;
  54. }
  55. .v-expansion-panels--variant-accordion .v-expansion-panel-title__overlay {
  56. transition: 0.3s border-radius cubic-bezier(0.4, 0, 0.2, 1);
  57. }
  58. .v-expansion-panel {
  59. flex: 1 0 100%;
  60. max-width: 100%;
  61. position: relative;
  62. transition: 0.3s all cubic-bezier(0.4, 0, 0.2, 1);
  63. transition-property: margin-top, border-radius, border, max-width;
  64. border-radius: 4px;
  65. }
  66. .v-expansion-panel:not(:first-child)::after {
  67. border-top-style: solid;
  68. border-top-width: thin;
  69. content: "";
  70. left: 0;
  71. position: absolute;
  72. right: 0;
  73. top: 0;
  74. transition: 0.3s opacity cubic-bezier(0.4, 0, 0.2, 1);
  75. }
  76. .v-expansion-panel--disabled .v-expansion-panel-title {
  77. pointer-events: none;
  78. }
  79. .v-expansion-panel--active:not(:first-child),
  80. .v-expansion-panel--active + .v-expansion-panel {
  81. margin-top: 16px;
  82. }
  83. .v-expansion-panel--active:not(:first-child)::after,
  84. .v-expansion-panel--active + .v-expansion-panel::after {
  85. opacity: 0;
  86. }
  87. .v-expansion-panel--active > .v-expansion-panel-title {
  88. border-bottom-left-radius: 0;
  89. border-bottom-right-radius: 0;
  90. min-height: 64px;
  91. }
  92. .v-expansion-panel__shadow {
  93. position: absolute;
  94. top: 0;
  95. left: 0;
  96. width: 100%;
  97. height: 100%;
  98. box-shadow: 0px 3px 1px -2px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 2px 2px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 1px 5px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.12));
  99. border-radius: inherit;
  100. z-index: -1;
  101. }
  102. .v-expansion-panel-title {
  103. align-items: center;
  104. text-align: start;
  105. border-radius: inherit;
  106. display: flex;
  107. font-size: 0.9375rem;
  108. line-height: 1;
  109. min-height: 48px;
  110. outline: none;
  111. padding: 16px 24px;
  112. position: relative;
  113. transition: 0.3s min-height cubic-bezier(0.4, 0, 0.2, 1);
  114. width: 100%;
  115. justify-content: space-between;
  116. }
  117. .v-expansion-panel-title:hover > .v-expansion-panel-title__overlay {
  118. opacity: calc(var(--v-hover-opacity) * var(--v-theme-overlay-multiplier));
  119. }
  120. .v-expansion-panel-title:focus-visible > .v-expansion-panel-title__overlay {
  121. opacity: calc(var(--v-focus-opacity) * var(--v-theme-overlay-multiplier));
  122. }
  123. @supports not selector(:focus-visible) {
  124. .v-expansion-panel-title:focus > .v-expansion-panel-title__overlay {
  125. opacity: calc(var(--v-focus-opacity) * var(--v-theme-overlay-multiplier));
  126. }
  127. }
  128. .v-expansion-panel-title--active > .v-expansion-panel-title__overlay, .v-expansion-panel-title[aria-haspopup=menu][aria-expanded=true] > .v-expansion-panel-title__overlay {
  129. opacity: calc(var(--v-activated-opacity) * var(--v-theme-overlay-multiplier));
  130. }
  131. .v-expansion-panel-title--active:hover > .v-expansion-panel-title__overlay, .v-expansion-panel-title[aria-haspopup=menu][aria-expanded=true]:hover > .v-expansion-panel-title__overlay {
  132. opacity: calc((var(--v-activated-opacity) + var(--v-hover-opacity)) * var(--v-theme-overlay-multiplier));
  133. }
  134. .v-expansion-panel-title--active:focus-visible > .v-expansion-panel-title__overlay, .v-expansion-panel-title[aria-haspopup=menu][aria-expanded=true]:focus-visible > .v-expansion-panel-title__overlay {
  135. opacity: calc((var(--v-activated-opacity) + var(--v-focus-opacity)) * var(--v-theme-overlay-multiplier));
  136. }
  137. @supports not selector(:focus-visible) {
  138. .v-expansion-panel-title--active:focus > .v-expansion-panel-title__overlay, .v-expansion-panel-title[aria-haspopup=menu][aria-expanded=true]:focus > .v-expansion-panel-title__overlay {
  139. opacity: calc((var(--v-activated-opacity) + var(--v-focus-opacity)) * var(--v-theme-overlay-multiplier));
  140. }
  141. }
  142. .v-expansion-panel-title--active::before {
  143. opacity: 0.12;
  144. }
  145. .v-expansion-panel-title__overlay {
  146. position: absolute;
  147. top: 0;
  148. left: 0;
  149. width: 100%;
  150. height: 100%;
  151. background-color: currentColor;
  152. border-radius: inherit;
  153. opacity: 0;
  154. }
  155. .v-expansion-panel-title__icon {
  156. display: inline-flex;
  157. margin-bottom: -4px;
  158. margin-top: -4px;
  159. user-select: none;
  160. margin-inline-start: auto;
  161. }
  162. .v-expansion-panel-text {
  163. display: flex;
  164. }
  165. .v-expansion-panel-text__wrapper {
  166. padding: 8px 24px 16px;
  167. flex: 1 1 auto;
  168. max-width: 100%;
  169. }
  170. .v-expansion-panels--variant-accordion > .v-expansion-panel {
  171. margin-top: 0;
  172. }
  173. .v-expansion-panels--variant-accordion > .v-expansion-panel::after {
  174. opacity: 1;
  175. }
  176. .v-expansion-panels--variant-popout > .v-expansion-panel {
  177. max-width: calc(100% - 32px);
  178. }
  179. .v-expansion-panels--variant-popout > .v-expansion-panel--active {
  180. max-width: calc(100% + 16px);
  181. }
  182. .v-expansion-panels--variant-inset > .v-expansion-panel {
  183. max-width: 100%;
  184. }
  185. .v-expansion-panels--variant-inset > .v-expansion-panel--active {
  186. max-width: calc(100% - 32px);
  187. }