Initial coomit for AAI-UI(sparky-fe)
[aai/sparky-fe.git] / resources / scss / bootstrap / _list-group.scss
1 //
2 // List groups
3 // --------------------------------------------------
4
5 // Base class
6 //
7 // Easily usable on <ul>, <ol>, or <div>.
8
9 .list-group {
10   // No need to set list-style: none; since .list-group-item is block level
11   margin-bottom: 20px;
12   padding-left: 0; // reset padding because ul and ol
13 }
14
15 // Individual list items
16 //
17 // Use on `li`s or `div`s within the `.list-group` parent.
18
19 .list-group-item {
20   position: relative;
21   display: block;
22   padding: 10px 15px;
23   // Place the border on the list items and negative margin up for better styling
24   margin-bottom: -1px;
25   background-color: $list-group-bg;
26   border: 1px solid $list-group-border;
27
28   // Round the first and last items
29   &:first-child {
30         @include border-top-radius($list-group-border-radius);
31   }
32   &:last-child {
33         margin-bottom: 0;
34         @include border-bottom-radius($list-group-border-radius);
35   }
36 }
37
38 // Interactive list items
39 //
40 // Use anchor or button elements instead of `li`s or `div`s to create interactive items.
41 // Includes an extra `.active` modifier class for showing selected items.
42
43 a.list-group-item,
44 button.list-group-item {
45   color: $list-group-link-color;
46
47   .list-group-item-heading {
48         color: $list-group-link-heading-color;
49   }
50
51   // Hover state
52   &:hover,
53   &:focus {
54         text-decoration: none;
55         color: $list-group-link-hover-color;
56         background-color: $list-group-hover-bg;
57   }
58 }
59
60 button.list-group-item {
61   width: 100%;
62   text-align: left;
63 }
64
65 .list-group-item {
66   // Disabled state
67   &.disabled,
68   &.disabled:hover,
69   &.disabled:focus {
70         background-color: $list-group-disabled-bg;
71         color: $list-group-disabled-color;
72         cursor: $cursor-disabled;
73
74         // Force color to inherit for custom content
75         .list-group-item-heading {
76           color: inherit;
77         }
78         .list-group-item-text {
79           color: $list-group-disabled-text-color;
80         }
81   }
82
83   // Active class on item itself, not parent
84   &.active,
85   &.active:hover,
86   &.active:focus {
87         z-index: 2; // Place active items above their siblings for proper border styling
88         color: $list-group-active-color;
89         background-color: $list-group-active-bg;
90         border-color: $list-group-active-border;
91
92         // Force color to inherit for custom content
93         .list-group-item-heading,
94         .list-group-item-heading > small,
95         .list-group-item-heading > .small {
96           color: inherit;
97         }
98         .list-group-item-text {
99           color: $list-group-active-text-color;
100         }
101   }
102 }
103
104 // Contextual variants
105 //
106 // Add modifier classes to change text and background color on individual items.
107 // Organizationally, this must come after the `:hover` states.
108
109 @include list-group-item-variant(success, $state-success-bg, $state-success-text);
110 @include list-group-item-variant(info, $state-info-bg, $state-info-text);
111 @include list-group-item-variant(warning, $state-warning-bg, $state-warning-text);
112 @include list-group-item-variant(danger, $state-danger-bg, $state-danger-text);
113
114 // Custom content options
115 //
116 // Extra classes for creating well-formatted content within `.list-group-item`s.
117
118 .list-group-item-heading {
119   margin-top: 0;
120   margin-bottom: 5px;
121 }
122
123 .list-group-item-text {
124   margin-bottom: 0;
125   line-height: 1.3;
126 }