2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

Contextual list group cleanup

* Adds nav link to sidebar for contextual classes
* Refactors to use prefixed classes, like .list-group-item-info, instead of chained classes
* Adds default and linked variations to example in docs
This commit is contained in:
Mark Otto
2013-12-07 14:09:03 -08:00
parent 693915d127
commit 07de53c644
7 changed files with 181 additions and 57 deletions
+19 -7
View File
@@ -450,16 +450,28 @@
// List Groups
// -------------------------
.list-group-item-variant(@state; @background; @border) {
.list-group-item.@{state} {
.list-group-item-variant(@state; @background; @color) {
.list-group-item-@{state} {
color: @color;
background-color: @background;
border-color: @border;
}
a.list-group-item-@{state} {
color: @color;
// Hover states
.list-group-item.@{state}:hover {
background-color: darken(@background, 5%);
border-color: darken(@border, 5%);
.list-group-item-heading { color: inherit; }
&:hover,
&:focus {
color: @color;
background-color: darken(@background, 5%);
}
&.active,
&.active:hover,
&.active:focus {
color: #fff;
background-color: @color;
border-color: @color;
}
}
}