.list { // No need to set list-style: none; since .list-item is block level margin-bottom: 20px; padding-left: 0; // reset padding because ul and ol @include list-style($list-default-background, $list-default-border, $gray-dark); &.list-success { @include list-style($list-success-background, $list-success-border, $white); } } // Individual list items // ------------------------- .list-item { position: relative; display: block; // Place the border on the list items and negative margin up for better styling margin-bottom: -1px; background-color: $list-default-background; border: $list-item-border; // Round the first and last items &:first-child { //@include border-top-radius($list-group-border-radius); } &:last-child { margin-bottom: 0; //@include border-bottom-radius($list-group-border-radius); } // Align badges within list items > .badge { float: right; } // Align icons to the right > i:last-child { float: right; } > .badge + .badge { margin-right: 5px; } // [converter] extracted a& to a.list-item // Active class on item itself, not parent &.active, &.active:hover, &.active:focus { z-index: 2; //color: $list-group-active-color; //background-color: $list-group-active-bg; //border-color: $list-group-active-border; // Force color to inherit for custom content .list-item-heading { color: inherit; } .list-item-text { //color: lighten($list-group-active-bg, 40%); } } &.list-item-default { @include list-item-style-active($brand-default, $gray-dark, $gray-dark); } &.list-item-secondary { @include list-item-style-active($brand-default, $gray-dark, $gray-dark); } &.list-item-primary { @include list-item-style-active($brand-primary, $gray-dark, $white); } &.list-item-info { @include list-item-style-active($brand-info, $gray-dark, $white); } &.list-item-success { @include list-item-style-active($brand-success, $gray-dark, $white); } &.list-item-warning { @include list-item-style-active($brand-warning, $gray-dark, $white); } &.list-item-danger { @include list-item-style-active($brand-danger, $gray-dark, $white); } &.list-item-dark { @include list-item-style-active($brand-dark, $gray-dark, $white); } } // Linked list items a.list-item { color: $gray-dark; text-decoration: none; // Hover state &:hover, &:focus { text-decoration: none; //background-color: $list-group-hover-bg; } } .list-editing { .list-item-content { left: 50px; } .list-item-edit { left: 0px; opacity: 1; } } .list-item-content { position: relative; background-color: #fff; z-index: 1; padding: 15px 15px; -webkit-transition: left 0.2s ease-in-out; // Align icons to the right > i:last-child { float: right; } } .list-item-edit { position: absolute; z-index: 0; left: -48px; top: 0; width: 48px; height: 100%; line-height: 100%; opacity: 0; -webkit-transition: left 0.2s ease-in-out, opacity 0.2s ease-in-out; i { color: $brand-danger; font-size: 36px; } } .list-item-buttons { position: absolute; z-index: 0; right: 0; top: 0; .button { border-radius: 0; border: none; } } .list-divider { padding: 5px 15px; background-color: $list-divider-bg; color: $list-divider-color; font-weight: bold; } // Custom content options // ------------------------- .list-item-heading { margin-top: 0; margin-bottom: 5px; } .list-item-text { margin-bottom: 0; line-height: 1.3; }