Skip to content

Commit

Permalink
Style datagrid rows full width of the container
Browse files Browse the repository at this point in the history
  • Loading branch information
texodus committed Oct 9, 2023
1 parent 9832438 commit 39d3338
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 7 deletions.
10 changes: 9 additions & 1 deletion packages/perspective-viewer-datagrid/src/less/pro.less
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,19 @@ perspective-viewer-datagrid:not(.sub-cell-scroll-disabled) regular-table table {
200% var(--regular-table--clip-y, 0)
);
}

thead tr:last-child:after {
transform: translate(var(--regular-table--transform-x, 0px));
}

tbody tr:not(:first-child):after {
transform: translate(var(--regular-table--transform-x, 0px));
}
}

regular-table {
font-family: inherit;
--rt-hover--border-color: #c5c9d080;

div[tabindex] {
outline: none;
Expand Down Expand Up @@ -175,7 +184,6 @@ regular-table {

table {
position: absolute;
overflow: hidden;
color: #666;
outline: none;
}
Expand Down
30 changes: 30 additions & 0 deletions packages/perspective-viewer-datagrid/src/less/regular_table.less
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,36 @@ regular-table table {
}
}

regular-table table thead tr:last-child:after {
width: 10000px;
box-sizing: border-box;
display: block;
height: 23px;
content: " ";
border-bottom: 1px solid var(--inactive--border-color);
}

regular-table table tbody tr:after {
width: 10000px;
box-sizing: border-box;
display: block;
height: 23px;
content: " ";
border-top: 1px solid transparent;
}

regular-table table tbody tr:not(:first-child):after {
border-top: 1px solid var(--inactive--border-color);
}

regular-table table tbody tr:hover:not(:first-child):after {
border-top: 1px solid var(--rt-hover--border-color);
}

regular-table table tbody tr:hover + tr:after {
border-top: 1px solid var(--rt-hover--border-color);
}

@keyframes pulse_pos {
0% {
background-color: var(
Expand Down
5 changes: 3 additions & 2 deletions packages/perspective-viewer-datagrid/src/less/row-hover.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ regular-table {
th.psp-tree-leaf:not(.psp-row-selected):not(.psp-row-subselected),
tr:hover
th.psp-tree-label:not(.psp-row-selected):not(.psp-row-subselected),
tr:hover td:not(.psp-row-selected):not(.psp-row-subselected) {
tr:hover td:not(.psp-row-selected):not(.psp-row-subselected),
tr:hover:after {
border-color: var(--rt-hover--border-color, #c5c9d080) !important;
background-color: transparent;
box-shadow: // 0px -2px 0px rgba(0,0,0,0.05),
Expand Down Expand Up @@ -46,7 +47,7 @@ regular-table {

th:last-child,
td:last-child {
border-right-width: 1px;
border-right-width: 0px;
border-right-color: transparent;
}
}
Expand Down
4 changes: 0 additions & 4 deletions rust/perspective-viewer/src/themes/pro-dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,7 @@ perspective-string-column-style[theme="Pro Dark"] {

table tbody tr {

td,
th {
--rt-hover--border-color: #61656e;
border-top-color: #3b3f46;
}
}
}

Expand Down

0 comments on commit 39d3338

Please sign in to comment.