_lists.scss 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. .list-group {
  2. margin-left: 0;
  3. margin-right: 0;
  4. }
  5. .list-group-header {
  6. background: $list-group-header-bg;
  7. padding: .5rem $list-group-item-padding-x;
  8. font-size: $h5-font-size;
  9. font-weight: var(--#{$prefix}font-weight-medium);
  10. line-height: 1;
  11. text-transform: uppercase;
  12. color: $list-group-header-color;
  13. border-bottom: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color);
  14. .list-group-flush > & {
  15. &:last-child {
  16. border-bottom-width: 0;
  17. }
  18. }
  19. }
  20. .list-group-item {
  21. background-color: inherit;
  22. }
  23. .list-group-item.active {
  24. background-color: $dropdown-link-hover-bg;
  25. border-left-color: $component-active-bg;
  26. border-left-width: $border-width-wide;
  27. }
  28. .list-group-item {
  29. &:active,
  30. &:focus,
  31. &:hover {
  32. background-color: $dropdown-link-hover-bg;
  33. }
  34. }
  35. .list-group-item {
  36. &.disabled,
  37. &:disabled {
  38. color: $gray-500;
  39. background-color: $dropdown-link-hover-bg;
  40. }
  41. }
  42. .list-bordered {
  43. .list-item {
  44. border-top: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color);
  45. margin-top: -1px;
  46. &:first-child {
  47. border-top: none;
  48. }
  49. }
  50. }
  51. .list-group-hoverable {
  52. .list-group-item-actions {
  53. opacity: 0;
  54. @include transition(opacity $transition-time);
  55. }
  56. .list-group-item:hover .list-group-item-actions,
  57. .list-group-item-actions.show {
  58. opacity: 1;
  59. }
  60. }
  61. .list-group-transparent {
  62. --#{$prefix}list-group-border-radius: 0;
  63. margin: 0 (- $list-group-item-padding-x);
  64. .list-group-item {
  65. background: none;
  66. border: 0;
  67. .icon {
  68. color: var(--#{$prefix}secondary);
  69. }
  70. &.active {
  71. font-weight: var(--#{$prefix}font-weight-bold);
  72. color: inherit;
  73. background: $list-group-active-bg;
  74. .icon {
  75. color: inherit;
  76. }
  77. }
  78. }
  79. }
  80. .list-separated-item {
  81. padding: 1rem 0;
  82. &:first-child {
  83. padding-top: 0;
  84. }
  85. &:last-child {
  86. padding-bottom: 0;
  87. }
  88. & + & {
  89. border-top: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color);
  90. }
  91. }
  92. /**
  93. Inline list
  94. */
  95. .list-inline-item:not(:last-child) {
  96. margin-right: auto;
  97. margin-inline-end: $list-inline-padding;
  98. }
  99. .list-inline-dots {
  100. .list-inline-item + .list-inline-item:before {
  101. content: ' · ';
  102. margin-inline-end: $list-inline-padding;
  103. }
  104. }