VAlert.css 4.9 KB

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