salix/front/core/components/table/style.scss

232 lines
5.4 KiB
SCSS
Raw Normal View History

@import "effects";
2019-02-10 21:52:35 +00:00
@import "variables";
vn-table {
2019-01-27 23:26:01 +00:00
display: block;
width: 100%;
2019-11-14 14:05:56 +00:00
overflow: auto;
2019-10-11 15:38:04 +00:00
}
.vn-table {
width: 100%;
display: table;
border-collapse: collapse;
& > vn-thead,
& > thead {
display: table-header-group;
2020-04-02 12:52:02 +00:00
border-bottom: 2px solid $color-spacer;
2019-10-11 15:38:04 +00:00
& > * > th {
font-weight: normal;
}
& > * > vn-th[field] {
overflow: visible;
2020-11-13 08:30:40 +00:00
cursor: pointer
2019-10-11 15:38:04 +00:00
}
}
& > vn-tbody,
& > a.vn-tbody,
2019-10-11 15:38:04 +00:00
& > tbody {
display: table-row-group;
}
& > vn-tfoot,
& > .vn-tfoot,
2019-10-11 15:38:04 +00:00
& > tfoot {
2020-04-02 12:52:02 +00:00
border-top: 2px solid $color-spacer;
2019-10-11 15:38:04 +00:00
display: table-footer-group
}
& > * > vn-tr,
& > * > a.vn-tr,
& > * > tr {
display: table-row;
2020-04-02 12:20:57 +00:00
height: 48px;
2019-10-11 15:38:04 +00:00
}
vn-thead, .vn-thead,
vn-tbody, .vn-tbody,
vn-tfoot, .vn-tfoot,
2019-10-11 15:38:04 +00:00
thead, tbody, tfoot {
& > * {
display: table-row;
2019-10-11 15:38:04 +00:00
& > vn-th,
& > th {
color: $color-font-light;
2020-04-02 12:20:57 +00:00
padding-top: 16px;
padding-bottom: 12px;
2019-10-11 15:38:04 +00:00
}
& > vn-th,
& > vn-td,
& > th,
& > td {
overflow: hidden;
}
& > vn-th,
& > vn-td,
& > vn-td-editable,
& > th,
& > td {
vertical-align: middle;
display: table-cell;
text-align: left;
2020-04-02 12:20:57 +00:00
padding: 9px 8px;
2019-10-11 15:38:04 +00:00
white-space: nowrap;
text-overflow: ellipsis;
2020-04-02 12:20:57 +00:00
max-width: 80px;
2019-02-10 21:52:35 +00:00
2019-10-11 15:38:04 +00:00
&[number] {
text-align: right;
2020-04-02 12:20:57 +00:00
width: 96px;
2019-02-10 21:52:35 +00:00
}
2019-10-11 15:38:04 +00:00
&[center] {
text-align: center;
2019-02-10 21:52:35 +00:00
}
2019-10-11 15:38:04 +00:00
&[shrink] {
width: 1px;
text-align: center;
2019-02-10 21:52:35 +00:00
}
2021-02-16 14:40:20 +00:00
&[shrink-date] {
width: 100px;
2021-05-11 07:43:15 +00:00
max-width: 100px;
}
&[shrink-datetime] {
width: 150px;
max-width: 150px;
2021-02-16 14:40:20 +00:00
}
2019-10-11 15:38:04 +00:00
&[expand] {
2020-04-02 12:52:02 +00:00
max-width: 400px;
2019-10-11 15:38:04 +00:00
min-width: 0;
2019-02-10 21:52:35 +00:00
}
2021-01-28 14:10:47 +00:00
&[vn-fetched-tags] {
width: 235px;
min-width: 155px;
& > vn-one {
overflow: hidden;
text-overflow: ellipsis;
font-size: 1rem;
2021-01-28 14:10:47 +00:00
}
& > vn-one:nth-child(2) h3 {
color: $color-font-secondary;
text-transform: uppercase;
line-height: initial;
font-size: 0.75rem
}
}
&[vn-fetched-tags][wide] {
width: 430px;
}
2019-10-11 15:38:04 +00:00
vn-icon.bright, i.bright {
color: #f7931e;
2019-02-10 21:52:35 +00:00
}
}
2019-10-11 15:38:04 +00:00
& > :last-child {
2020-04-02 12:52:02 +00:00
padding-right: 22px;
2019-10-11 15:38:04 +00:00
}
& > :first-child {
2020-04-02 12:52:02 +00:00
padding-left: 22px;
2019-10-11 15:38:04 +00:00
}
}
2019-10-11 15:38:04 +00:00
& > a.vn-tr {
color: inherit;
}
2019-10-11 15:38:04 +00:00
}
a.vn-tbody {
&.clickable {
@extend %clickable;
}
}
2019-10-11 15:38:04 +00:00
vn-tbody > *,
.vn-tbody > *,
2019-10-11 15:38:04 +00:00
tbody > * {
2020-04-02 12:20:57 +00:00
border-bottom: 1px solid $color-spacer-light;
2019-10-11 15:38:04 +00:00
&:last-child {
border-bottom: none;
}
2019-10-11 15:38:04 +00:00
&.clickable {
@extend %clickable;
}
2019-10-11 15:38:04 +00:00
& > vn-td,
& > td {
.chip {
2020-04-02 12:20:57 +00:00
padding: 4px;
border-radius: 4px;
2019-10-11 15:38:04 +00:00
color: $color-font-bg;
2019-02-13 13:01:37 +00:00
2019-10-11 15:38:04 +00:00
&.notice {
background-color: $color-notice-medium
}
2019-10-11 15:38:04 +00:00
&.success {
background-color: $color-success-medium;
}
2019-10-11 15:38:04 +00:00
&.warning {
background-color: $color-main-medium;
}
2019-10-11 15:38:04 +00:00
&.alert {
background-color: $color-alert-medium;
2019-02-10 21:52:35 +00:00
}
2019-10-11 15:38:04 +00:00
&.message {
color: $color-font-dark;
background-color: $color-bg-dark
2019-02-10 21:52:35 +00:00
}
}
2019-10-11 15:38:04 +00:00
vn-icon-menu {
2019-07-15 09:40:11 +00:00
display: inline-block;
color: $color-main;
2020-04-02 12:52:02 +00:00
padding: 4px
2019-07-15 09:40:11 +00:00
}
2019-10-11 15:38:04 +00:00
}
& > [actions] {
width: 1px;
2019-07-15 09:40:11 +00:00
2019-10-11 15:38:04 +00:00
& > * {
vertical-align: middle;
}
}
2018-12-20 08:22:07 +00:00
}
.vn-textfield {
2018-12-20 08:22:07 +00:00
float: right;
margin: 0!important;
}
.vn-check {
2019-02-22 07:52:30 +00:00
margin: 0;
}
.empty-rows {
color: $color-font-secondary;
font-size: 1.375rem;
text-align: center;
}
2021-05-11 07:43:15 +00:00
}
vn-table.scrollable,
vn-table.scrollable > .vn-table,
.vn-table.scrollable {
border-collapse: separate;
overflow: auto;
vn-thead, thead {
border-bottom: 0px solid transparent
}
vn-thead th,
vn-thead vn-th,
thead vn-th,
thead th {
border-bottom: 2px solid $color-spacer;
background-color: #FFF;
position: sticky;
z-index: 9;
2021-05-11 07:43:15 +00:00
top: 0
}
}
vn-table.scrollable.sm,
.vn-table.scrollable.sm {
max-height: 300px
}
vn-table.scrollable.lg,
.vn-table.scrollable.lg {
max-height: 700px
}