Commit b5493a17 authored by Guillaume Grossetie's avatar Guillaume Grossetie

Use nested rules

parent 35cce468
...@@ -195,109 +195,134 @@ ...@@ -195,109 +195,134 @@
} }
} }
&.grid-none > thead > tr > th { &.grid-none {
> thead > tr {
> th {
border-bottom-width: 0; border-bottom-width: 0;
border-right-width: 0; border-right-width: 0;
border-left-width: 0; border-left-width: 0;
&:first-child {
border-left-width: 1px;
} }
&.grid-rows > thead > tr > th, &:last-child {
&.grid-rows > tbody > tr > td { border-right-width: 1px;
border-right-width: 0; }
border-left-width: 0;
} }
}
> tbody {
> tr {
> td {
border-width: 0;
&.grid-none > thead > tr > th:first-child, &:first-child {
&.grid-rows > thead > tr > th:first-child {
border-left-width: 1px; border-left-width: 1px;
} }
&.grid-none > thead > tr > th:last-child, &:last-child {
&.grid-rows > thead > tr > th:last-child {
border-right-width: 1px; border-right-width: 1px;
} }
}
&.grid-none > tbody > tr > td { &:last-child > td {
border-width: 0; border-bottom-width: 1px;
}
}
}
}
&.grid-rows {
> thead > tr > th,
> tbody > tr > td {
border-right-width: 0;
border-left-width: 0;
} }
&.grid-none > tbody > tr > td:first-child { > thead > tr {
> th:first-child {
border-left-width: 1px; border-left-width: 1px;
} }
&.grid-none > tbody > tr > td:last-child { > th:last-child {
border-right-width: 1px; border-right-width: 1px;
} }
&.grid-none > tbody > tr:last-child > td {
border-bottom-width: 1px;
} }
&.grid-rows > tbody > tr > td { > tbody > tr {
> td {
border-left-width: 0; border-left-width: 0;
border-right-width: 0; border-right-width: 0;
} }
&.grid-rows > tbody > tr > td:first-child { > td:first-child {
border-left-width: 1px; border-left-width: 1px;
} }
&.grid-rows > tbody > tr > td:last-child { > td:last-child {
border-right-width: 1px; border-right-width: 1px;
} }
}
}
&.grid-cols > thead > tr > th { &.grid-cols {
> thead > tr > th {
border-bottom-width: 0; border-bottom-width: 0;
} }
&.grid-cols > tbody > tr > td { > tbody > tr > td {
border-top-width: 0; border-top-width: 0;
border-bottom-width: 0; border-bottom-width: 0;
} }
&.grid-cols > tbody > tr:last-child > td { > tbody > tr:last-child > td {
border-bottom-width: 1px; border-bottom-width: 1px;
} }
}
&.frame-sides > thead > tr > th { &.frame-sides {
> thead > tr > th {
border-top-width: 0; border-top-width: 0;
} }
&.frame-sides > tbody > tr:last-child > td { > tbody > tr:last-child > td {
border-bottom-width: 0; border-bottom-width: 0;
} }
}
&.frame-topbot > thead > tr > th:first-child, &.frame-topbot,
&.frame-ends > thead > tr > th:first-child, &.frame-ends {
&.frame-topbot > tbody > tr > td:first-child, > thead > tr > th:first-child,
&.frame-ends > tbody > tr > td:first-child { > tbody > tr > td:first-child {
border-left-width: 0; border-left-width: 0;
} }
&.frame-topbot > thead > tr > th:last-child, > thead > tr > th:last-child,
&.frame-ends > thead > tr > th:last-child, > tbody > tr > td:last-child {
&.frame-topbot > tbody > tr > td:last-child,
&.frame-ends > tbody > tr > td:last-child {
border-right-width: 0; border-right-width: 0;
} }
}
&.frame-none > thead > tr > th { &.frame-none {
> thead > tr > th {
border-top-width: 0; border-top-width: 0;
} }
&.frame-none > tbody > tr:last-child > td { > tbody > tr:last-child > td {
border-bottom-width: 0; border-bottom-width: 0;
} }
&.frame-none > thead > tr > th:first-child, > thead > tr > th:first-child,
&.frame-none > tbody > tr > td:first-child { > tbody > tr > td:first-child {
border-left-width: 0; border-left-width: 0;
} }
&.frame-none > thead > tr > th:last-child, > thead > tr > th:last-child,
&.frame-none > tbody > tr > td:last-child { > tbody > tr > td:last-child {
border-right-width: 0; border-right-width: 0;
} }
}
&.stripes-all tr, &.stripes-all tr,
&.stripes-odd tr:nth-of-type(odd), &.stripes-odd tr:nth-of-type(odd),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment