Skip to content

Commit d1c6566

Browse files
authored
Fixes css issues with datatable (#5896)
* make table headers look good on all themes * fix search icon * fix table column text positioning
1 parent b625717 commit d1c6566

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

src/resources/assets/css/common.css

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
--select2-selected-item-background: #7c69ef;
44
--select2-selected-item-color: #fff;
55
--btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
6+
--datatable-search-icon-color: #999;
67
}
78

89
.sidebar .nav-dropdown-items .nav-dropdown {
@@ -597,6 +598,32 @@ div[id$="_wrapper"] .dt-processing {
597598
opacity: 1 !important;
598599
}
599600

601+
.datatable_search_stack .input-icon input[type=search] {
602+
padding-left: 2.5rem;
603+
}
604+
605+
.datatable_search_stack .input-icon {
606+
position: relative;
607+
}
608+
609+
.datatable_search_stack .input-icon .input-icon-addon .icon {
610+
fill: none;
611+
}
612+
613+
.input-icon-addon {
614+
position: absolute;
615+
top: 0;
616+
bottom: 0;
617+
left: 0;
618+
display: flex;
619+
align-items: center;
620+
justify-content: center;
621+
min-width: 2.5rem;
622+
color: var(--datatable-search-icon-color);
623+
pointer-events: none;
624+
font-size: 1.2em;
625+
}
626+
600627
.dt-container .dataTables_info {
601628
clear: both;
602629
float: left;
@@ -698,6 +725,10 @@ table.dataTable tr th:first-child, table.dataTable tr td:first-child, table.data
698725
padding-left: 0.6rem;
699726
}
700727

728+
table.dataTable td {
729+
vertical-align: middle;
730+
}
731+
701732
/* Processing indicator - global styles */
702733
.dataTables_processing,
703734
.dt-processing {
@@ -900,7 +931,7 @@ div.dt-scroll-body {
900931

901932
/* Adjust table headers */
902933
.dataTable thead th {
903-
font-size: 0.70em;
934+
vertical-align: middle;
904935
font-weight: 700;
905936
}
906937

0 commit comments

Comments
 (0)