VAlert.css 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. .v-alert {
  2. display: grid;
  3. flex: 1 1;
  4. grid-template-areas: "prepend content append close" ". content . .";
  5. grid-template-columns: max-content auto max-content max-content;
  6. position: relative;
  7. padding: 16px;
  8. overflow: hidden;
  9. --v-border-color: currentColor;
  10. border-radius: 4px;
  11. }
  12. .v-alert--absolute {
  13. position: absolute;
  14. }
  15. .v-alert--fixed {
  16. position: fixed;
  17. }
  18. .v-alert--sticky {
  19. position: sticky;
  20. }
  21. .v-alert--variant-plain, .v-alert--variant-outlined, .v-alert--variant-text, .v-alert--variant-tonal {
  22. background: transparent;
  23. color: inherit;
  24. }
  25. .v-alert--variant-plain {
  26. opacity: 0.62;
  27. }
  28. .v-alert--variant-plain:focus, .v-alert--variant-plain:hover {
  29. opacity: 1;
  30. }
  31. .v-alert--variant-plain .v-alert__overlay {
  32. display: none;
  33. }
  34. .v-alert--variant-elevated, .v-alert--variant-flat {
  35. background: rgb(var(--v-theme-on-surface-variant));
  36. color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
  37. }
  38. .v-alert--variant-elevated {
  39. box-shadow: 0px 2px 1px -1px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 1px 1px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 1px 3px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.12));
  40. }
  41. .v-alert--variant-flat {
  42. box-shadow: 0px 0px 0px 0px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 0px 0px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 0px 0px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.12));
  43. }
  44. .v-alert--variant-outlined {
  45. border: thin solid currentColor;
  46. }
  47. .v-alert--variant-text .v-alert__overlay {
  48. background: currentColor;
  49. }
  50. .v-alert--variant-tonal .v-alert__underlay {
  51. background: currentColor;
  52. opacity: var(--v-activated-opacity);
  53. border-radius: inherit;
  54. position: absolute;
  55. top: 0;
  56. right: 0;
  57. bottom: 0;
  58. left: 0;
  59. pointer-events: none;
  60. }
  61. .v-alert--prominent {
  62. grid-template-areas: "prepend content append close" "prepend content . .";
  63. }
  64. .v-alert.v-alert--border {
  65. --v-border-opacity: 0.38;
  66. }
  67. .v-alert.v-alert--border.v-alert--border-start {
  68. padding-inline-start: 24px;
  69. }
  70. .v-alert.v-alert--border.v-alert--border-end {
  71. padding-inline-end: 24px;
  72. }
  73. .v-alert--variant-plain {
  74. transition: 0.2s opacity cubic-bezier(0.4, 0, 0.2, 1);
  75. }
  76. .v-alert--density-default {
  77. padding-bottom: 16px;
  78. padding-top: 16px;
  79. }
  80. .v-alert--density-default.v-alert--border-top {
  81. padding-top: 24px;
  82. }
  83. .v-alert--density-default.v-alert--border-bottom {
  84. padding-bottom: 24px;
  85. }
  86. .v-alert--density-comfortable {
  87. padding-bottom: 12px;
  88. padding-top: 12px;
  89. }
  90. .v-alert--density-comfortable.v-alert--border-top {
  91. padding-top: 20px;
  92. }
  93. .v-alert--density-comfortable.v-alert--border-bottom {
  94. padding-bottom: 20px;
  95. }
  96. .v-alert--density-compact {
  97. padding-bottom: 8px;
  98. padding-top: 8px;
  99. }
  100. .v-alert--density-compact.v-alert--border-top {
  101. padding-top: 16px;
  102. }
  103. .v-alert--density-compact.v-alert--border-bottom {
  104. padding-bottom: 16px;
  105. }
  106. .v-alert__border {
  107. border-radius: inherit;
  108. bottom: 0;
  109. left: 0;
  110. opacity: var(--v-border-opacity);
  111. position: absolute;
  112. pointer-events: none;
  113. right: 0;
  114. top: 0;
  115. width: 100%;
  116. border-color: currentColor;
  117. border-style: solid;
  118. border-width: 0;
  119. }
  120. .v-alert__border--border {
  121. border-width: 8px;
  122. box-shadow: none;
  123. }
  124. .v-alert--border-start .v-alert__border {
  125. border-inline-start-width: 8px;
  126. }
  127. .v-alert--border-end .v-alert__border {
  128. border-inline-end-width: 8px;
  129. }
  130. .v-alert--border-top .v-alert__border {
  131. border-top-width: 8px;
  132. }
  133. .v-alert--border-bottom .v-alert__border {
  134. border-bottom-width: 8px;
  135. }
  136. .v-alert__close {
  137. flex: 0 1 auto;
  138. grid-area: close;
  139. }
  140. .v-alert__content {
  141. align-self: center;
  142. grid-area: content;
  143. overflow: hidden;
  144. }
  145. .v-alert__append,
  146. .v-alert__close {
  147. align-self: flex-start;
  148. margin-inline-start: 16px;
  149. }
  150. .v-alert__append {
  151. align-self: flex-start;
  152. grid-area: append;
  153. }
  154. .v-alert__append + .v-alert__close {
  155. margin-inline-start: 16px;
  156. }
  157. .v-alert__prepend {
  158. align-self: flex-start;
  159. display: flex;
  160. align-items: center;
  161. grid-area: prepend;
  162. margin-inline-end: 16px;
  163. }
  164. .v-alert--prominent .v-alert__prepend {
  165. align-self: center;
  166. }
  167. .v-alert__underlay {
  168. grid-area: none;
  169. position: absolute;
  170. }
  171. .v-alert--border-start .v-alert__underlay {
  172. border-top-left-radius: 0;
  173. border-bottom-left-radius: 0;
  174. }
  175. .v-alert--border-end .v-alert__underlay {
  176. border-top-right-radius: 0;
  177. border-bottom-right-radius: 0;
  178. }
  179. .v-alert--border-top .v-alert__underlay {
  180. border-top-left-radius: 0;
  181. border-top-right-radius: 0;
  182. }
  183. .v-alert--border-bottom .v-alert__underlay {
  184. border-bottom-left-radius: 0;
  185. border-bottom-right-radius: 0;
  186. }
  187. .v-alert-title {
  188. align-items: center;
  189. align-self: center;
  190. display: flex;
  191. font-size: 1.25rem;
  192. font-weight: 500;
  193. hyphens: auto;
  194. letter-spacing: 0.0125em;
  195. line-height: 1.75rem;
  196. overflow-wrap: normal;
  197. text-transform: none;
  198. word-break: normal;
  199. word-wrap: break-word;
  200. }