VList.sass 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. @use 'sass:list'
  2. @use '../../styles/tools'
  3. @use './variables' as *
  4. @include tools.layer('components')
  5. .v-list
  6. overflow: auto
  7. padding: $list-padding
  8. position: relative
  9. outline: none
  10. @include tools.border($list-border...)
  11. @include tools.elevation($list-elevation)
  12. @include tools.rounded($list-border-radius)
  13. @include tools.theme($list-theme...)
  14. &--disabled
  15. pointer-events: none
  16. user-select: none
  17. &--nav
  18. padding-inline: $list-nav-padding
  19. &--rounded
  20. @include tools.rounded($list-rounded-border-radius)
  21. &--subheader
  22. padding-top: $list-subheader-padding-top
  23. .v-list-img
  24. border-radius: inherit
  25. display: flex
  26. height: 100%
  27. left: 0
  28. overflow: hidden
  29. position: absolute
  30. top: 0
  31. width: 100%
  32. z-index: -1
  33. .v-list-subheader
  34. $root: &
  35. align-items: center
  36. background: inherit
  37. color: $list-subheader-color
  38. display: flex
  39. font-size: $list-subheader-font-size
  40. font-weight: $list-subheader-font-weight
  41. line-height: $list-subheader-line-height
  42. padding-inline-end: $list-subheader-padding-end
  43. min-height: $list-subheader-min-height
  44. transition: $list-subheader-transition
  45. &__text
  46. overflow: hidden
  47. text-overflow: ellipsis
  48. white-space: nowrap
  49. @at-root
  50. @include tools.density('v-list', $list-density) using ($modifier)
  51. $base-padding: list.nth($list-item-padding, 2)
  52. #{$root}
  53. min-height: $list-subheader-min-height + ($modifier * $list-subheader-min-height-multiplier)
  54. padding-inline-start: calc(#{$base-padding} + var(--indent-padding)) !important
  55. &--inset
  56. --indent-padding: #{$list-subheader-inset-padding-start}
  57. .v-list--nav &
  58. font-size: $list-nav-subheader-font-size
  59. &--sticky
  60. background: inherit
  61. left: 0
  62. position: sticky
  63. top: 0
  64. z-index: 1
  65. .v-list__overlay
  66. background-color: currentColor
  67. border-radius: inherit
  68. bottom: 0
  69. left: 0
  70. opacity: 0
  71. pointer-events: none
  72. position: absolute
  73. right: 0
  74. top: 0
  75. transition: opacity 0.2s ease-in-out