siwi-table
Version:
table for siwi
89 lines • 2.43 kB
text/less
@import "../node_modules/siwi-variables/variables";
@css-namespace: replace(~"@{css-prefix}", '-', '');
@border-radius: 3px;
.@{css-namespace}.table {
width: 100%;
background: @white;
border: 1px solid @border-color;
box-shadow: none;
border-radius: @border-radius;
text-align: left;
color: @light-black;
border-collapse: separate;
border-spacing: 0;
&:first-child {
margin-top: 0;
}
&::last-child {
margin-bottom: 0;
}
th,
td {
-webkit-transition: background 0.1s ease, color 0.1s ease;
transition: background 0.1s ease, color 0.1s ease;
}
tr td {
border-top: 1px solid @border-color;
padding: .5rem 1rem;
}
tr:first-child td {
border-top: none;
}
thead {
box-shadow: none;
th {
cursor: auto;
background: @off-white;
text-align: inherit;
color: @black;
padding: 0.6rem 1em;
vertical-align: inherit;
font-style: none;
font-weight: bold;
text-transform: none;
border-bottom: 1px solid @border-color;
border-left: none;
}
tr>th:first-child {
border-left: none;
}
tr:first-child {
&>th:first-child {
border-radius: @border-radius 0 0 0;
}
&>th:last-child {
border-radius: 0 @border-radius 0 0;
}
&>th:only-child {
border-radius: @border-radius @border-radius 0 0;
}
}
}
tfoot {
box-shadow: none;
th {
cursor: auto;
border-top: 1px solid @border-color;
background: @off-white;
text-align: inherit;
color: rgba(0, 0, 0, 0.87);
padding: 0.78571429em 0.78571429em;
vertical-align: middle;
font-style: normal;
font-weight: normal;
text-transform: none;
}
tr>th:first-child {
border-left: none;
&:first-child {
border-radius: 0 0 0 @border-radius;
}
&:last-child {
border-radius: 0 0 @border-radius 0;
}
&:only-child {
border-radius: 0 0 @border-radius @border-radius;
}
}
}
}