VBtn.css 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. /** if false, disabled buttons will be greyed out */
  2. .v-btn {
  3. align-items: center;
  4. border-radius: 4px;
  5. display: inline-grid;
  6. grid-template-areas: "prepend content append";
  7. grid-template-columns: max-content auto max-content;
  8. font-weight: 500;
  9. justify-content: center;
  10. letter-spacing: 0.0892857143em;
  11. line-height: normal;
  12. max-width: 100%;
  13. outline: none;
  14. position: relative;
  15. text-decoration: none;
  16. text-indent: 0.0892857143em;
  17. text-transform: uppercase;
  18. transition-property: box-shadow, transform, opacity, background;
  19. transition-duration: 0.28s;
  20. transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  21. user-select: none;
  22. vertical-align: middle;
  23. flex-shrink: 0;
  24. border-color: rgba(var(--v-border-color), var(--v-border-opacity));
  25. border-style: solid;
  26. border-width: 0;
  27. }
  28. .v-btn--size-x-small {
  29. --v-btn-size: 0.625rem;
  30. --v-btn-height: 20px;
  31. font-size: var(--v-btn-size);
  32. min-width: 36px;
  33. padding: 0 8px;
  34. }
  35. .v-btn--size-small {
  36. --v-btn-size: 0.75rem;
  37. --v-btn-height: 28px;
  38. font-size: var(--v-btn-size);
  39. min-width: 50px;
  40. padding: 0 12px;
  41. }
  42. .v-btn--size-default {
  43. --v-btn-size: 0.875rem;
  44. --v-btn-height: 36px;
  45. font-size: var(--v-btn-size);
  46. min-width: 64px;
  47. padding: 0 16px;
  48. }
  49. .v-btn--size-large {
  50. --v-btn-size: 1rem;
  51. --v-btn-height: 44px;
  52. font-size: var(--v-btn-size);
  53. min-width: 78px;
  54. padding: 0 20px;
  55. }
  56. .v-btn--size-x-large {
  57. --v-btn-size: 1.125rem;
  58. --v-btn-height: 52px;
  59. font-size: var(--v-btn-size);
  60. min-width: 92px;
  61. padding: 0 24px;
  62. }
  63. .v-btn.v-btn--density-default {
  64. height: calc(var(--v-btn-height) + 0px);
  65. }
  66. .v-btn.v-btn--density-comfortable {
  67. height: calc(var(--v-btn-height) + -8px);
  68. }
  69. .v-btn.v-btn--density-compact {
  70. height: calc(var(--v-btn-height) + -12px);
  71. }
  72. .v-btn--border {
  73. border-width: thin;
  74. box-shadow: none;
  75. }
  76. .v-btn--absolute {
  77. position: absolute;
  78. }
  79. .v-btn--fixed {
  80. position: fixed;
  81. }
  82. .v-btn:hover > .v-btn__overlay {
  83. opacity: calc(var(--v-hover-opacity) * var(--v-theme-overlay-multiplier));
  84. }
  85. .v-btn:focus-visible > .v-btn__overlay {
  86. opacity: calc(var(--v-focus-opacity) * var(--v-theme-overlay-multiplier));
  87. }
  88. @supports not selector(:focus-visible) {
  89. .v-btn:focus > .v-btn__overlay {
  90. opacity: calc(var(--v-focus-opacity) * var(--v-theme-overlay-multiplier));
  91. }
  92. }
  93. .v-btn--active > .v-btn__overlay, .v-btn[aria-haspopup=menu][aria-expanded=true] > .v-btn__overlay {
  94. opacity: calc(var(--v-activated-opacity) * var(--v-theme-overlay-multiplier));
  95. }
  96. .v-btn--active:hover > .v-btn__overlay, .v-btn[aria-haspopup=menu][aria-expanded=true]:hover > .v-btn__overlay {
  97. opacity: calc((var(--v-activated-opacity) + var(--v-hover-opacity)) * var(--v-theme-overlay-multiplier));
  98. }
  99. .v-btn--active:focus-visible > .v-btn__overlay, .v-btn[aria-haspopup=menu][aria-expanded=true]:focus-visible > .v-btn__overlay {
  100. opacity: calc((var(--v-activated-opacity) + var(--v-focus-opacity)) * var(--v-theme-overlay-multiplier));
  101. }
  102. @supports not selector(:focus-visible) {
  103. .v-btn--active:focus > .v-btn__overlay, .v-btn[aria-haspopup=menu][aria-expanded=true]:focus > .v-btn__overlay {
  104. opacity: calc((var(--v-activated-opacity) + var(--v-focus-opacity)) * var(--v-theme-overlay-multiplier));
  105. }
  106. }
  107. .v-btn--variant-plain, .v-btn--variant-outlined, .v-btn--variant-text, .v-btn--variant-tonal {
  108. background: transparent;
  109. color: inherit;
  110. }
  111. .v-btn--variant-plain {
  112. opacity: 0.62;
  113. }
  114. .v-btn--variant-plain:focus, .v-btn--variant-plain:hover {
  115. opacity: 1;
  116. }
  117. .v-btn--variant-plain .v-btn__overlay {
  118. display: none;
  119. }
  120. .v-btn--variant-elevated, .v-btn--variant-flat {
  121. background: rgb(var(--v-theme-surface));
  122. color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
  123. }
  124. .v-btn--variant-elevated {
  125. 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));
  126. }
  127. .v-btn--variant-flat {
  128. 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));
  129. }
  130. .v-btn--variant-outlined {
  131. border: thin solid currentColor;
  132. }
  133. .v-btn--variant-text .v-btn__overlay {
  134. background: currentColor;
  135. }
  136. .v-btn--variant-tonal .v-btn__underlay {
  137. background: currentColor;
  138. opacity: var(--v-activated-opacity);
  139. border-radius: inherit;
  140. position: absolute;
  141. top: 0;
  142. right: 0;
  143. bottom: 0;
  144. left: 0;
  145. pointer-events: none;
  146. }
  147. @supports selector(:focus-visible) {
  148. .v-btn::after {
  149. content: "";
  150. position: absolute;
  151. top: 0;
  152. left: 0;
  153. width: 100%;
  154. height: 100%;
  155. pointer-events: none;
  156. border: 2px solid currentColor;
  157. border-radius: inherit;
  158. opacity: 0;
  159. transition: opacity 0.2s ease-in-out;
  160. }
  161. .v-btn:focus-visible::after {
  162. opacity: calc(0.25 * var(--v-theme-overlay-multiplier));
  163. }
  164. }
  165. .v-btn--icon {
  166. border-radius: 50%;
  167. min-width: 0;
  168. padding: 0;
  169. }
  170. .v-btn--icon.v-btn--size-default {
  171. --v-btn-size: 1rem;
  172. }
  173. .v-btn--icon.v-btn--density-default {
  174. width: calc(var(--v-btn-height) + 12px);
  175. height: calc(var(--v-btn-height) + 12px);
  176. }
  177. .v-btn--icon.v-btn--density-comfortable {
  178. width: calc(var(--v-btn-height) + 0px);
  179. height: calc(var(--v-btn-height) + 0px);
  180. }
  181. .v-btn--icon.v-btn--density-compact {
  182. width: calc(var(--v-btn-height) + -8px);
  183. height: calc(var(--v-btn-height) + -8px);
  184. }
  185. .v-btn--elevated:hover, .v-btn--elevated:focus {
  186. box-shadow: 0px 2px 4px -1px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 4px 5px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 1px 10px 0px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.12));
  187. }
  188. .v-btn--elevated:active {
  189. box-shadow: 0px 5px 5px -3px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, 0.2)), 0px 8px 10px 1px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.14)), 0px 3px 14px 2px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, 0.12));
  190. }
  191. .v-btn--flat {
  192. box-shadow: none;
  193. }
  194. .v-btn--block {
  195. display: flex;
  196. flex: 1 0 auto;
  197. min-width: 100%;
  198. }
  199. .v-btn--disabled {
  200. pointer-events: none;
  201. opacity: 0.26;
  202. }
  203. .v-btn--disabled.v-btn--variant-elevated, .v-btn--disabled.v-btn--variant-flat {
  204. box-shadow: none;
  205. opacity: 1;
  206. color: rgba(var(--v-theme-on-surface), 0.26);
  207. background: rgb(var(--v-theme-surface));
  208. }
  209. .v-btn--disabled.v-btn--variant-elevated .v-btn__overlay, .v-btn--disabled.v-btn--variant-flat .v-btn__overlay {
  210. opacity: 0.4615384615;
  211. }
  212. .v-btn--loading {
  213. pointer-events: none;
  214. }
  215. .v-btn--loading .v-btn__content,
  216. .v-btn--loading .v-btn__prepend,
  217. .v-btn--loading .v-btn__append {
  218. opacity: 0;
  219. }
  220. .v-btn--stacked {
  221. grid-template-areas: "prepend" "content" "append";
  222. grid-template-columns: auto;
  223. grid-template-rows: max-content max-content max-content;
  224. justify-items: center;
  225. align-content: center;
  226. }
  227. .v-btn--stacked .v-btn__content {
  228. flex-direction: column;
  229. line-height: 1.25;
  230. }
  231. .v-btn--stacked .v-btn__prepend,
  232. .v-btn--stacked .v-btn__append,
  233. .v-btn--stacked .v-btn__content > .v-icon--start,
  234. .v-btn--stacked .v-btn__content > .v-icon--end {
  235. margin-inline-start: 0;
  236. margin-inline-end: 0;
  237. }
  238. .v-btn--stacked .v-btn__prepend,
  239. .v-btn--stacked .v-btn__content > .v-icon--start {
  240. margin-bottom: 4px;
  241. }
  242. .v-btn--stacked .v-btn__append,
  243. .v-btn--stacked .v-btn__content > .v-icon--end {
  244. margin-top: 4px;
  245. }
  246. .v-btn--stacked.v-btn--size-x-small {
  247. --v-btn-size: 0.625rem;
  248. --v-btn-height: 56px;
  249. font-size: var(--v-btn-size);
  250. min-width: 56px;
  251. padding: 0 12px;
  252. }
  253. .v-btn--stacked.v-btn--size-small {
  254. --v-btn-size: 0.75rem;
  255. --v-btn-height: 64px;
  256. font-size: var(--v-btn-size);
  257. min-width: 64px;
  258. padding: 0 14px;
  259. }
  260. .v-btn--stacked.v-btn--size-default {
  261. --v-btn-size: 0.875rem;
  262. --v-btn-height: 72px;
  263. font-size: var(--v-btn-size);
  264. min-width: 72px;
  265. padding: 0 16px;
  266. }
  267. .v-btn--stacked.v-btn--size-large {
  268. --v-btn-size: 1rem;
  269. --v-btn-height: 80px;
  270. font-size: var(--v-btn-size);
  271. min-width: 80px;
  272. padding: 0 18px;
  273. }
  274. .v-btn--stacked.v-btn--size-x-large {
  275. --v-btn-size: 1.125rem;
  276. --v-btn-height: 88px;
  277. font-size: var(--v-btn-size);
  278. min-width: 88px;
  279. padding: 0 20px;
  280. }
  281. .v-btn--stacked.v-btn--density-default {
  282. height: calc(var(--v-btn-height) + 0px);
  283. }
  284. .v-btn--stacked.v-btn--density-comfortable {
  285. height: calc(var(--v-btn-height) + -16px);
  286. }
  287. .v-btn--stacked.v-btn--density-compact {
  288. height: calc(var(--v-btn-height) + -24px);
  289. }
  290. .v-btn--rounded {
  291. border-radius: 24px;
  292. }
  293. .v-btn .v-icon {
  294. --v-icon-size-multiplier: 0.8571428571;
  295. }
  296. .v-btn--icon .v-icon {
  297. --v-icon-size-multiplier: 1;
  298. }
  299. .v-btn--stacked .v-icon {
  300. --v-icon-size-multiplier: 1.1428571429;
  301. }
  302. .v-btn__loader {
  303. align-items: center;
  304. display: flex;
  305. height: 100%;
  306. justify-content: center;
  307. left: 0;
  308. position: absolute;
  309. top: 0;
  310. width: 100%;
  311. }
  312. .v-btn__content,
  313. .v-btn__prepend,
  314. .v-btn__append {
  315. align-items: center;
  316. display: flex;
  317. transition: transform, opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  318. }
  319. .v-btn__prepend {
  320. grid-area: prepend;
  321. margin-inline-start: calc(var(--v-btn-height) / -9);
  322. margin-inline-end: calc(var(--v-btn-height) / 4.5);
  323. }
  324. .v-btn__append {
  325. grid-area: append;
  326. margin-inline-start: calc(var(--v-btn-height) / 4.5);
  327. margin-inline-end: calc(var(--v-btn-height) / -9);
  328. }
  329. .v-btn__content {
  330. grid-area: content;
  331. justify-content: center;
  332. white-space: nowrap;
  333. }
  334. .v-btn__content > .v-icon--start {
  335. margin-inline-start: calc(var(--v-btn-height) / -9);
  336. margin-inline-end: calc(var(--v-btn-height) / 4.5);
  337. }
  338. .v-btn__content > .v-icon--end {
  339. margin-inline-start: calc(var(--v-btn-height) / 4.5);
  340. margin-inline-end: calc(var(--v-btn-height) / -9);
  341. }
  342. .v-btn--stacked .v-btn__content {
  343. white-space: normal;
  344. }
  345. .v-btn__overlay {
  346. background-color: currentColor;
  347. border-radius: inherit;
  348. opacity: 0;
  349. transition: opacity 0.2s ease-in-out;
  350. }
  351. .v-btn__overlay,
  352. .v-btn__underlay {
  353. position: absolute;
  354. top: 0;
  355. left: 0;
  356. width: 100%;
  357. height: 100%;
  358. pointer-events: none;
  359. }
  360. .v-card-actions .v-btn {
  361. padding: 0 8px;
  362. }
  363. .v-card-actions .v-btn ~ .v-btn:not(.v-btn-toggle .v-btn) {
  364. margin-inline-start: 0.5rem;
  365. }
  366. .v-banner-actions .v-btn {
  367. padding: 0 8px;
  368. }
  369. .v-pagination .v-btn {
  370. border-radius: 4px;
  371. }
  372. .v-btn__overlay {
  373. transition: none;
  374. }
  375. .v-pagination__item--is-active .v-btn__overlay {
  376. opacity: var(--v-border-opacity);
  377. }
  378. .v-snackbar-actions .v-btn {
  379. padding: 0 8px;
  380. }