Skip to content

Commit 2afe37c

Browse files
Merge pull request #1561 from rocket-admin/fixes
table view: fix sorting button position
2 parents c372167 + 0d37020 commit 2afe37c

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

frontend/src/app/components/dashboard/db-table-view/db-table-view.component.css

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,6 @@
337337
grid-template-columns: repeat(var(--colCount), auto) !important;
338338
}
339339

340-
/* .db-table ::ng-deep .mat-mdc-row:nth-child(even) {
341-
background-color: rgba(0, 0, 0, 0.02);
342-
} */
343-
344340
.db-table ::ng-deep .db-table-row {
345341
cursor: pointer;
346342
}
@@ -487,6 +483,7 @@ td.mat-cell {
487483

488484
/* Sortable header styles */
489485
.sortable-header__content {
486+
position: relative;
490487
display: flex;
491488
align-items: center;
492489
justify-content: space-between;
@@ -502,14 +499,27 @@ td.mat-cell {
502499
}
503500

504501
.sortable-header__button {
502+
position: absolute;
503+
right: 0;
505504
opacity: 0;
506505
width: 24px;
507506
height: 24px;
508507
line-height: 24px;
509-
flex-shrink: 0;
510508
transition: opacity 0.2s ease;
511509
}
512510

511+
@media (prefers-color-scheme: light) {
512+
.sortable-header__button {
513+
background: rgba(255, 255, 255, 1);
514+
}
515+
}
516+
517+
@media (prefers-color-scheme: dark) {
518+
.sortable-header__button {
519+
background: rgba(32, 32, 32, 1);
520+
}
521+
}
522+
513523
.sortable-header:hover .sortable-header__button,
514524
.sortable-header_active .sortable-header__button {
515525
opacity: 1;

0 commit comments

Comments
 (0)