feat: Optimize SCSS architecture.

This commit is contained in:
a.bouhuolia
2021-01-17 12:17:15 +02:00
parent a747750d88
commit 09db5df686
154 changed files with 2814 additions and 2772 deletions

View File

@@ -0,0 +1,279 @@
@import 'src/style/Base.scss';
.bigcapital-datatable {
display: block;
.dashboard__page-content & {
.table .thead {
.th {
border-bottom-color: #d2dde2;
}
}
}
.table {
text-align: left;
border-spacing: 0;
min-width: 100%;
display: block;
.thead {
overflow-y: auto;
overflow-x: hidden;
.th {
padding: 0.6rem 0.5rem;
background: #fafafa;
font-size: 14px;
color: #58667b;
font-weight: 500;
border-bottom: 1px solid rgb(224, 224, 224);
}
.sort-icon {
width: 0;
height: 0;
position: relative;
top: -2px;
display: inline-block;
margin-left: 5px;
&--desc {
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-bottom: 6px solid #666;
}
&--asc {
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 6px solid #666;
}
}
}
.tr {
display: flex;
flex: 1 0 auto;
&:last-child {
.td {
border-bottom: 0;
}
}
}
.th,
.td {
box-sizing: border-box;
flex: 0 0 auto;
justify-content: flex-start;
align-items: flex-start;
display: flex;
margin: 0;
padding: 0.5rem;
&:last-child {
border-right: 0;
}
.bp3-control {
margin-bottom: 0;
}
.resizer {
display: inline-block;
background: transparent;
width: 10px;
height: 100%;
position: absolute;
right: 0;
top: 0;
transform: translateX(50%);
z-index: 1;
touch-action: none;
&.isResizing {
// background: red;
}
.inner-resizer {
height: 100%;
width: 1px;
border-left: 1px solid #ececec;
margin: 0 auto;
}
&.isResizing .inner-resizer {
background: #1183da;
}
}
.bp3-control.bp3-checkbox .bp3-control-indicator {
border: 2px solid #d7d7d7;
&,
&:hover {
height: 16px;
width: 16px;
}
}
.bp3-control.bp3-checkbox {
input:checked ~ .bp3-control-indicator,
input:indeterminate ~ .bp3-control-indicator {
border-color: #0052ff;
}
}
}
.tbody {
width: 100%;
overflow: auto;
.tbody-inner {
> .loading {
padding-top: 40px;
}
}
.tr .td {
border-bottom: 1px solid #e8e8e8;
align-items: center;
color: #141720;
.placeholder {
color: #a0a0a0;
}
.bp3-form-group {
width: 100%;
}
}
.tr:hover .td {
background: #f3f7fc;
}
.tr.is-context-menu-active .td {
background: #f3fafc;
}
.td.actions .#{$ns}-button {
background: #e6effb;
border: 0;
box-shadow: none;
padding: 5px 15px;
border-radius: 8px;
&:hover,
&:focus {
background-color: #cfdcee;
}
svg {
color: #425361;
}
.bp3-icon-more-h-16 {
margin-top: 2px;
}
}
.tr.no-results {
.td {
flex-direction: column;
padding: 20px;
color: #666;
align-items: center;
}
}
> .loading {
padding-top: 50px;
}
}
.tr .th,
.tr .td {
.expand-toggle {
cursor: pointer;
display: inline-block;
padding: 0 8px 0 0;
padding-left: 0;
margin: auto 0;
margin-left: 4px;
.arrow-right {
width: 0;
height: 0;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-left: 8px solid #acacac;
display: block;
}
.arrow-down {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 8px solid #acacac;
display: block;
}
}
}
}
.no-results {
color: #666;
.td {
padding-top: 20px;
padding-bottom: 20px;
width: 100%;
}
}
&.has-sticky-header {
.thead {
.tr .th {
position: sticky;
}
}
}
&.has-sticky {
.thead,
.tfoot {
position: sticky;
z-index: 1;
}
.thead {
top: 0;
// box-shadow: 0px 3px 3px #ccc;
}
.tfoot {
bottom: 0;
// box-shadow: 0px -3px 3px #ccc;
}
.tbody {
position: relative;
z-index: 0;
}
[data-sticky-td] {
position: sticky;
}
[data-sticky-last-left-td] {
// box-shadow: 2px 0px 3px #ccc;
}
[data-sticky-first-right-td] {
// box-shadow: -2px 0px 3px #ccc;
}
}
&.has-virtualized-rows {
.tbody {
overflow-y: scroll;
overflow-x: hidden;
}
}
}