VListItem.css 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  1. .v-list-item {
  2. align-items: center;
  3. display: grid;
  4. flex: none;
  5. grid-template-areas: "prepend content append";
  6. grid-template-columns: max-content 1fr auto;
  7. outline: none;
  8. max-width: 100%;
  9. padding: 4px 16px;
  10. position: relative;
  11. text-decoration: none;
  12. }
  13. .v-list-item {
  14. border-color: rgba(var(--v-border-color), var(--v-border-opacity));
  15. border-style: solid;
  16. border-width: 0;
  17. }
  18. .v-list-item--border {
  19. border-width: thin;
  20. box-shadow: none;
  21. }
  22. .v-list-item:hover > .v-list-item__overlay {
  23. opacity: calc(var(--v-hover-opacity) * var(--v-theme-overlay-multiplier));
  24. }
  25. .v-list-item:focus-visible > .v-list-item__overlay {
  26. opacity: calc(var(--v-focus-opacity) * var(--v-theme-overlay-multiplier));
  27. }
  28. @supports not selector(:focus-visible) {
  29. .v-list-item:focus > .v-list-item__overlay {
  30. opacity: calc(var(--v-focus-opacity) * var(--v-theme-overlay-multiplier));
  31. }
  32. }
  33. .v-list-item--active > .v-list-item__overlay, .v-list-item[aria-haspopup=menu][aria-expanded=true] > .v-list-item__overlay {
  34. opacity: calc(var(--v-activated-opacity) * var(--v-theme-overlay-multiplier));
  35. }
  36. .v-list-item--active:hover > .v-list-item__overlay, .v-list-item[aria-haspopup=menu][aria-expanded=true]:hover > .v-list-item__overlay {
  37. opacity: calc((var(--v-activated-opacity) + var(--v-hover-opacity)) * var(--v-theme-overlay-multiplier));
  38. }
  39. .v-list-item--active:focus-visible > .v-list-item__overlay, .v-list-item[aria-haspopup=menu][aria-expanded=true]:focus-visible > .v-list-item__overlay {
  40. opacity: calc((var(--v-activated-opacity) + var(--v-focus-opacity)) * var(--v-theme-overlay-multiplier));
  41. }
  42. @supports not selector(:focus-visible) {
  43. .v-list-item--active:focus > .v-list-item__overlay, .v-list-item[aria-haspopup=menu][aria-expanded=true]:focus > .v-list-item__overlay {
  44. opacity: calc((var(--v-activated-opacity) + var(--v-focus-opacity)) * var(--v-theme-overlay-multiplier));
  45. }
  46. }
  47. .v-list-item {
  48. border-radius: 0;
  49. }
  50. .v-list-item--variant-plain, .v-list-item--variant-outlined, .v-list-item--variant-text, .v-list-item--variant-tonal {
  51. background: transparent;
  52. color: inherit;
  53. }
  54. .v-list-item--variant-plain {
  55. opacity: 0.62;
  56. }
  57. .v-list-item--variant-plain:focus, .v-list-item--variant-plain:hover {
  58. opacity: 1;
  59. }
  60. .v-list-item--variant-plain .v-list-item__overlay {
  61. display: none;
  62. }
  63. .v-list-item--variant-elevated, .v-list-item--variant-flat {
  64. background: rgba(var(--v-theme-surface));
  65. color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
  66. }
  67. .v-list-item--variant-elevated {
  68. 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));
  69. }
  70. .v-list-item--variant-flat {
  71. 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));
  72. }
  73. .v-list-item--variant-outlined {
  74. border: thin solid currentColor;
  75. }
  76. .v-list-item--variant-text .v-list-item__overlay {
  77. background: currentColor;
  78. }
  79. .v-list-item--variant-tonal .v-list-item__underlay {
  80. background: currentColor;
  81. opacity: var(--v-activated-opacity);
  82. border-radius: inherit;
  83. top: 0;
  84. right: 0;
  85. bottom: 0;
  86. left: 0;
  87. pointer-events: none;
  88. }
  89. .v-list-item .v-list-item__underlay {
  90. position: absolute;
  91. }
  92. @supports selector(:focus-visible) {
  93. .v-list-item::after {
  94. pointer-events: none;
  95. border: 2px solid currentColor;
  96. border-radius: 4px;
  97. opacity: 0;
  98. transition: opacity 0.2s ease-in-out;
  99. }
  100. .v-list-item::after {
  101. content: "";
  102. position: absolute;
  103. top: 0;
  104. left: 0;
  105. width: 100%;
  106. height: 100%;
  107. }
  108. .v-list-item:focus-visible::after {
  109. opacity: calc(0.15 * var(--v-theme-overlay-multiplier));
  110. }
  111. }
  112. .v-list-item__prepend > .v-badge .v-icon,
  113. .v-list-item__prepend > .v-icon, .v-list-item__append > .v-badge .v-icon,
  114. .v-list-item__append > .v-icon {
  115. opacity: var(--v-medium-emphasis-opacity);
  116. }
  117. .v-list-item--active .v-list-item__prepend > .v-badge .v-icon,
  118. .v-list-item--active .v-list-item__prepend > .v-icon,
  119. .v-list-item--active .v-list-item__append > .v-badge .v-icon,
  120. .v-list-item--active .v-list-item__append > .v-icon {
  121. opacity: 1;
  122. }
  123. .v-list-item--active:not(.v-list-item--link) .v-list-item__overlay {
  124. opacity: calc(var(--v-activated-opacity) * var(--v-theme-overlay-multiplier));
  125. }
  126. .v-list-item--rounded {
  127. border-radius: 4px;
  128. }
  129. .v-list-item--disabled {
  130. pointer-events: none;
  131. user-select: none;
  132. opacity: 0.6;
  133. }
  134. .v-list-item--link {
  135. cursor: pointer;
  136. }
  137. .v-navigation-drawer--rail:not(.v-navigation-drawer--expand-on-hover) .v-list-item .v-avatar, .v-navigation-drawer--rail.v-navigation-drawer--expand-on-hover:not(.v-navigation-drawer--is-hovering) .v-list-item .v-avatar {
  138. --v-avatar-height: 24px;
  139. }
  140. .v-list-item__prepend {
  141. align-items: center;
  142. align-self: center;
  143. display: flex;
  144. grid-area: prepend;
  145. }
  146. .v-list-item__prepend > .v-badge ~ .v-list-item__spacer,
  147. .v-list-item__prepend > .v-icon ~ .v-list-item__spacer,
  148. .v-list-item__prepend > .v-tooltip ~ .v-list-item__spacer {
  149. width: 32px;
  150. }
  151. .v-list-item__prepend > .v-avatar ~ .v-list-item__spacer,
  152. .v-list-item__prepend > .v-badge:is(:has(.v-avatar)) ~ .v-list-item__spacer {
  153. width: 16px;
  154. }
  155. .v-list-item--slim .v-list-item__prepend > .v-badge ~ .v-list-item__spacer,
  156. .v-list-item--slim .v-list-item__prepend > .v-icon ~ .v-list-item__spacer,
  157. .v-list-item--slim .v-list-item__prepend > .v-tooltip ~ .v-list-item__spacer {
  158. width: 20px;
  159. }
  160. .v-list-item--slim .v-list-item__prepend > .v-avatar ~ .v-list-item__spacer,
  161. .v-list-item--slim .v-list-item__prepend > .v-badge:is(:has(.v-avatar)) ~ .v-list-item__spacer {
  162. width: 4px;
  163. }
  164. .v-list-item--slim .v-list-item__prepend > .v-list-item-action ~ .v-list-item__spacer {
  165. width: 4px;
  166. }
  167. .v-list-item--three-line .v-list-item__prepend {
  168. align-self: start;
  169. }
  170. .v-list-item__append {
  171. align-self: center;
  172. display: flex;
  173. align-items: center;
  174. grid-area: append;
  175. }
  176. .v-list-item__append .v-list-item__spacer {
  177. order: -1;
  178. transition: 150ms width cubic-bezier(0.4, 0, 0.2, 1);
  179. }
  180. .v-list-item__append > .v-badge ~ .v-list-item__spacer,
  181. .v-list-item__append > .v-icon ~ .v-list-item__spacer,
  182. .v-list-item__append > .v-tooltip ~ .v-list-item__spacer {
  183. width: 32px;
  184. }
  185. .v-list-item__append > .v-avatar ~ .v-list-item__spacer,
  186. .v-list-item__append > .v-badge:is(:has(.v-avatar)) ~ .v-list-item__spacer {
  187. width: 16px;
  188. }
  189. .v-list-item__append > .v-list-item-action ~ .v-list-item__spacer {
  190. width: 16px;
  191. }
  192. .v-list-item--slim .v-list-item__append > .v-badge ~ .v-list-item__spacer,
  193. .v-list-item--slim .v-list-item__append > .v-icon ~ .v-list-item__spacer,
  194. .v-list-item--slim .v-list-item__append > .v-tooltip ~ .v-list-item__spacer {
  195. width: 20px;
  196. }
  197. .v-list-item--slim .v-list-item__append > .v-avatar ~ .v-list-item__spacer,
  198. .v-list-item--slim .v-list-item__append > .v-badge:is(:has(.v-avatar)) ~ .v-list-item__spacer {
  199. width: 4px;
  200. }
  201. .v-list-item--slim .v-list-item__append > .v-list-item-action ~ .v-list-item__spacer {
  202. width: 4px;
  203. }
  204. .v-list-item--three-line .v-list-item__append {
  205. align-self: start;
  206. }
  207. .v-list-item__content {
  208. align-self: center;
  209. grid-area: content;
  210. overflow: hidden;
  211. }
  212. .v-list-item-action {
  213. align-self: center;
  214. display: flex;
  215. align-items: center;
  216. flex: none;
  217. transition: inherit;
  218. transition-property: height, width;
  219. }
  220. .v-list-item-action--start {
  221. margin-inline-end: 8px;
  222. margin-inline-start: -8px;
  223. }
  224. .v-list-item-action--end {
  225. margin-inline-start: 8px;
  226. margin-inline-end: -8px;
  227. }
  228. .v-list-item-media {
  229. margin-top: 0;
  230. margin-bottom: 0;
  231. }
  232. .v-list-item-media--start {
  233. margin-inline-end: 16px;
  234. }
  235. .v-list-item-media--end {
  236. margin-inline-start: 16px;
  237. }
  238. .v-list-item--two-line .v-list-item-media {
  239. margin-top: -4px;
  240. margin-bottom: -4px;
  241. }
  242. .v-list-item--three-line .v-list-item-media {
  243. margin-top: 0;
  244. margin-bottom: 0;
  245. }
  246. .v-list-item-subtitle {
  247. -webkit-box-orient: vertical;
  248. display: -webkit-box;
  249. opacity: var(--v-list-item-subtitle-opacity, var(--v-medium-emphasis-opacity));
  250. overflow: hidden;
  251. padding: 0;
  252. text-overflow: ellipsis;
  253. overflow-wrap: break-word;
  254. word-break: initial;
  255. }
  256. .v-list-item--one-line .v-list-item-subtitle {
  257. -webkit-line-clamp: 1;
  258. }
  259. .v-list-item--two-line .v-list-item-subtitle {
  260. -webkit-line-clamp: 2;
  261. }
  262. .v-list-item--three-line .v-list-item-subtitle {
  263. -webkit-line-clamp: 3;
  264. }
  265. .v-list-item-subtitle {
  266. font-size: 0.875rem;
  267. font-weight: 400;
  268. letter-spacing: 0.0178571429em;
  269. line-height: 1rem;
  270. text-transform: none;
  271. }
  272. .v-list-item--nav .v-list-item-subtitle {
  273. font-size: 0.75rem;
  274. font-weight: 400;
  275. letter-spacing: 0.0178571429em;
  276. line-height: 1rem;
  277. }
  278. .v-list-item-title {
  279. hyphens: auto;
  280. overflow-wrap: normal;
  281. overflow: hidden;
  282. padding: 0;
  283. white-space: nowrap;
  284. text-overflow: ellipsis;
  285. word-break: normal;
  286. word-wrap: break-word;
  287. }
  288. .v-list-item-title {
  289. font-size: 1rem;
  290. font-weight: 400;
  291. letter-spacing: 0.009375em;
  292. line-height: 1.5;
  293. text-transform: none;
  294. }
  295. .v-list-item--nav .v-list-item-title {
  296. font-size: 0.8125rem;
  297. font-weight: 500;
  298. letter-spacing: normal;
  299. line-height: 1rem;
  300. }
  301. .v-list-item--density-default {
  302. min-height: 40px;
  303. }
  304. .v-list-item--density-default.v-list-item--one-line {
  305. min-height: 48px;
  306. padding-top: 4px;
  307. padding-bottom: 4px;
  308. }
  309. .v-list-item--density-default.v-list-item--two-line {
  310. min-height: 64px;
  311. padding-top: 12px;
  312. padding-bottom: 12px;
  313. }
  314. .v-list-item--density-default.v-list-item--three-line {
  315. min-height: 88px;
  316. padding-top: 16px;
  317. padding-bottom: 16px;
  318. }
  319. .v-list-item--density-default.v-list-item--three-line .v-list-item__prepend,
  320. .v-list-item--density-default.v-list-item--three-line .v-list-item__append {
  321. padding-top: 8px;
  322. }
  323. .v-list-item--density-default:not(.v-list-item--nav).v-list-item--one-line {
  324. padding-inline: 16px;
  325. }
  326. .v-list-item--density-default:not(.v-list-item--nav).v-list-item--two-line {
  327. padding-inline: 16px;
  328. }
  329. .v-list-item--density-default:not(.v-list-item--nav).v-list-item--three-line {
  330. padding-inline: 16px;
  331. }
  332. .v-list-item--density-comfortable {
  333. min-height: 36px;
  334. }
  335. .v-list-item--density-comfortable.v-list-item--one-line {
  336. min-height: 44px;
  337. }
  338. .v-list-item--density-comfortable.v-list-item--two-line {
  339. min-height: 60px;
  340. padding-top: 8px;
  341. padding-bottom: 8px;
  342. }
  343. .v-list-item--density-comfortable.v-list-item--three-line {
  344. min-height: 84px;
  345. padding-top: 12px;
  346. padding-bottom: 12px;
  347. }
  348. .v-list-item--density-comfortable.v-list-item--three-line .v-list-item__prepend,
  349. .v-list-item--density-comfortable.v-list-item--three-line .v-list-item__append {
  350. padding-top: 6px;
  351. }
  352. .v-list-item--density-comfortable:not(.v-list-item--nav).v-list-item--one-line {
  353. padding-inline: 16px;
  354. }
  355. .v-list-item--density-comfortable:not(.v-list-item--nav).v-list-item--two-line {
  356. padding-inline: 16px;
  357. }
  358. .v-list-item--density-comfortable:not(.v-list-item--nav).v-list-item--three-line {
  359. padding-inline: 16px;
  360. }
  361. .v-list-item--density-compact {
  362. min-height: 32px;
  363. }
  364. .v-list-item--density-compact.v-list-item--one-line {
  365. min-height: 40px;
  366. }
  367. .v-list-item--density-compact.v-list-item--two-line {
  368. min-height: 56px;
  369. padding-top: 4px;
  370. padding-bottom: 4px;
  371. }
  372. .v-list-item--density-compact.v-list-item--three-line {
  373. min-height: 80px;
  374. padding-top: 8px;
  375. padding-bottom: 8px;
  376. }
  377. .v-list-item--density-compact.v-list-item--three-line .v-list-item__prepend,
  378. .v-list-item--density-compact.v-list-item--three-line .v-list-item__append {
  379. padding-top: 4px;
  380. }
  381. .v-list-item--density-compact:not(.v-list-item--nav).v-list-item--one-line {
  382. padding-inline: 16px;
  383. }
  384. .v-list-item--density-compact:not(.v-list-item--nav).v-list-item--two-line {
  385. padding-inline: 16px;
  386. }
  387. .v-list-item--density-compact:not(.v-list-item--nav).v-list-item--three-line {
  388. padding-inline: 16px;
  389. }
  390. .v-list-item--nav {
  391. padding-inline: 8px;
  392. }
  393. .v-list .v-list-item--nav:not(:only-child) {
  394. margin-bottom: 4px;
  395. }
  396. .v-list-item__underlay {
  397. position: absolute;
  398. }
  399. .v-list-item__overlay {
  400. background-color: currentColor;
  401. border-radius: inherit;
  402. bottom: 0;
  403. left: 0;
  404. opacity: 0;
  405. pointer-events: none;
  406. position: absolute;
  407. right: 0;
  408. top: 0;
  409. transition: opacity 0.2s ease-in-out;
  410. }
  411. .v-list-item--active.v-list-item--variant-elevated .v-list-item__overlay {
  412. --v-theme-overlay-multiplier: 0;
  413. }
  414. .v-list {
  415. --indent-padding: 0px;
  416. }
  417. .v-list--nav {
  418. --indent-padding: -8px;
  419. }
  420. .v-list-group {
  421. --list-indent-size: 16px;
  422. --parent-padding: var(--indent-padding);
  423. --prepend-width: 40px;
  424. }
  425. .v-list--slim .v-list-group {
  426. --prepend-width: 28px;
  427. }
  428. .v-list-group--fluid {
  429. --list-indent-size: 0px;
  430. }
  431. .v-list-group--prepend {
  432. --parent-padding: calc(var(--indent-padding) + var(--prepend-width));
  433. }
  434. .v-list-group--fluid.v-list-group--prepend {
  435. --parent-padding: var(--indent-padding);
  436. }
  437. .v-list-group__items {
  438. --indent-padding: calc(var(--parent-padding) + var(--list-indent-size));
  439. }
  440. .v-list-group__items .v-list-item {
  441. padding-inline-start: calc(16px + var(--indent-padding)) !important;
  442. }
  443. .v-list-group__header:not(.v-treeview-item--activatable-group-activator).v-list-item--active:not(:focus-visible) .v-list-item__overlay {
  444. opacity: 0;
  445. }
  446. .v-list-group__header:not(.v-treeview-item--activatable-group-activator).v-list-item--active:hover .v-list-item__overlay {
  447. opacity: calc(var(--v-hover-opacity) * var(--v-theme-overlay-multiplier));
  448. }