0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Merge pull request #10741 from ZDroid/patch-1

Avoid LESS nesting if isn't needed
This commit is contained in:
Mark Otto 2013-09-22 07:25:33 -07:00
commit 5b12736fb7

View File

@ -91,47 +91,37 @@ th {
} }
} }
} }
> thead { > thead > tr {
> tr {
> th, > th,
> td { > td {
border-bottom-width: 2px; border-bottom-width: 2px;
} }
} }
} }
}
// Zebra-striping // Zebra-striping
// //
// Default zebra-stripe styles (alternating gray and transparent backgrounds) // Default zebra-stripe styles (alternating gray and transparent backgrounds)
.table-striped { .table-striped > tbody > tr:nth-child(odd) {
> tbody {
> tr:nth-child(odd) {
> td, > td,
> th { > th {
background-color: @table-bg-accent; background-color: @table-bg-accent;
} }
} }
}
}
// Hover effect // Hover effect
// //
// Placed here since it has to come after the potential zebra striping // Placed here since it has to come after the potential zebra striping
.table-hover { .table-hover > tbody > tr:hover {
> tbody {
> tr:hover {
> td, > td,
> th { > th {
background-color: @table-bg-hover; background-color: @table-bg-hover;
} }
} }
}
}
// Table cell sizing // Table cell sizing
@ -191,7 +181,7 @@ table {
border: 1px solid @table-border-color; border: 1px solid @table-border-color;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
// Tighten up spacing and give a background color // Tighten up spacing
> .table { > .table {
margin-bottom: 0; margin-bottom: 0;