mediawiki-skins-Citizen/skinStyles/jquery/datatables.less

481 lines
12 KiB
Plaintext
Raw Normal View History

/*
* Citizen
*
* SkinStyles for dataTables
* Shared by Extension:Cargo and Extension:SemanticResultFormats
*
* Date: 2024-03-19
*/
/* jquery.dataTables.css */
table.dataTable {
display: table;
max-width: 100%;
overflow: auto;
font-size: var( --font-size-small );
}
table.dataTable thead th,
table.dataTable tfoot th {
font-weight: var( --font-weight-semibold );
}
table.dataTable thead th,
table.dataTable thead td {
padding: var( --space-xs ) var( --space-sm );
font-size: var( --font-size-x-small );
font-weight: var( --font-weight-normal );
color: var( --color-base--subtle );
text-align: start;
letter-spacing: 0.05em;
border-bottom-color: var( --border-color-base );
}
table.dataTable tfoot th,
table.dataTable tfoot td {
border-top-color: var( --border-color-base );
}
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
&:hover {
background-color: var( --background-color-quiet--hover );
}
&:active {
background-color: var( --background-color-quiet--active );
}
}
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
// 19px is the icon size
padding-right: ~'calc( 19px + var( --space-sm ) )';
background-position-x: ~'calc( 100% - var( --space-xs ) )';
}
table.dataTable tbody tr {
background-color: var( --color-surface-0 );
}
table.dataTable tbody tr.selected {
background-color: var( --background-color-quiet--hover );
}
table.dataTable tbody th,
table.dataTable tbody td {
padding: var( --space-xs ) var( --space-sm );
}
table.dataTable.row-border tbody th,
table.dataTable.row-border tbody td,
table.dataTable.display tbody th,
table.dataTable.display tbody td {
border-top-color: var( --border-color-base );
}
table.dataTable.cell-border tbody th,
table.dataTable.cell-border tbody td {
border-top-color: var( --border-color-base );
border-right-color: var( --border-color-base );
}
table.dataTable.cell-border tbody tr th:first-child,
table.dataTable.cell-border tbody tr td:first-child {
border-left-color: var( --border-color-base );
}
table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd {
background-color: var( --color-surface-2 );
}
table.dataTable.stripe tbody tr.odd.selected,
table.dataTable.display tbody tr.odd.selected {
background-color: var( --background-color-quiet--hover );
}
table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover,
table.dataTable.hover tbody tr:hover.selected,
table.dataTable.display tbody tr:hover.selected {
background-color: var( --background-color-quiet--hover );
}
table.dataTable.order-column tbody tr > .sorting_1,
table.dataTable.order-column tbody tr > .sorting_2,
table.dataTable.order-column tbody tr > .sorting_3,
table.dataTable.display tbody tr > .sorting_1,
table.dataTable.display tbody tr > .sorting_2,
table.dataTable.display tbody tr > .sorting_3 {
background-color: var( --color-surface-3 );
}
table.dataTable.order-column tbody tr.selected > .sorting_1,
table.dataTable.order-column tbody tr.selected > .sorting_2,
table.dataTable.order-column tbody tr.selected > .sorting_3,
table.dataTable.display tbody tr.selected > .sorting_1,
table.dataTable.display tbody tr.selected > .sorting_2,
table.dataTable.display tbody tr.selected > .sorting_3 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr.odd > .sorting_1,
table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr.odd > .sorting_2,
table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr.odd > .sorting_3,
table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr.odd.selected > .sorting_1,
table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr.odd.selected > .sorting_2,
table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr.odd.selected > .sorting_3,
table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr.even > .sorting_1,
table.dataTable.order-column.stripe tbody tr.even > .sorting_1 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr.even > .sorting_2,
table.dataTable.order-column.stripe tbody tr.even > .sorting_2 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr.even > .sorting_3,
table.dataTable.order-column.stripe tbody tr.even > .sorting_3 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr.even.selected > .sorting_1,
table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr.even.selected > .sorting_2,
table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr.even.selected > .sorting_3,
table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr:hover > .sorting_1,
table.dataTable.order-column.hover tbody tr:hover > .sorting_1 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr:hover > .sorting_2,
table.dataTable.order-column.hover tbody tr:hover > .sorting_2 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr:hover > .sorting_3,
table.dataTable.order-column.hover tbody tr:hover > .sorting_3 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr:hover.selected > .sorting_1,
table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr:hover.selected > .sorting_2,
table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 {
background-color: var( --color-surface-3 );
}
table.dataTable.display tbody tr:hover.selected > .sorting_3,
table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 {
background-color: var( --color-surface-3 );
}
table.dataTable.no-footer {
border-bottom-color: var( --border-color-base );
}
table.dataTable tbody tr.selected > * {
box-shadow: inset 0 0 0 9999px var( --color-primary );
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
font-weight: var( --font-weight-medium );
color: var( --color-base--emphasized ) !important;
border-radius: var( --border-radius--small );
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
color: var( --color-base--emphasized ) !important;
background: var( --background-color-primary--active );
border-color: transparent;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
color: var( --color-base--subtle ) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
color: var( --color-base--emphasized ) !important;
background: var( --background-color-quiet--hover );
border-color: transparent;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:active {
background: var( --background-color-quiet--active );
box-shadow: none;
}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
font-size: var( --font-size-small );
color: var( --color-base );
}
.dataTables_wrapper .dataTables_filter + .dataTable {
// Add top border as divider if there are filter on top
border-top: 1px solid var( --border-color-base );
}
/* Filter */
.dataTables_wrapper {
.dataTables_filter {
margin-bottom: var( --space-sm );
input {
margin-left: var( --space-xxs );
}
}
.dataTables_length select,
.dataTables_filter input {
border: 1px solid var( --border-color-base--darker );
padding: var( --space-xs );
border-radius: var( --border-radius--small );
}
}
/* Search pane */
div.dtsp-topRow,
div.dtsp-topRow.dtsp-bordered,
div.dtsp-topRow.dtsp-bordered:hover,
div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane div.dataTables_wrapper,
div.dtsp-panesContainer div.dtsp-searchPanes div.dtsp-searchPane div.dataTables_wrapper:hover {
// Consistent border
border: 0;
border-radius: var( --border-radius--medium );
}
div.dtsp-topRow.dtsp-bordered:hover {
background-color: var( --background-color-quiet--hover );
opacity: 1;
}
div.dtsp-columns-2 {
// There is no need to hardcode it
min-width: auto;
max-width: none;
}
div.dtsp-panesContainer {
margin-bottom: var( --space-sm );
div.dtsp-titleRow {
margin-bottom: var( --space-xxs );
display: flex;
flex-wrap: wrap;
}
div.dtsp-title {
padding: var( --space-xs ) 0;
font-size: var( --font-size-x-small );
color: var( --color-base--subtle );
letter-spacing: 0.05em;
line-height: 1;
flex-grow: 1;
text-align: start;
}
div.dtsp-title,
button.dtsp-clearAll,
button.dtsp-collapseAll,
button.dtsp-showAll {
// Use flexbox instead
float: none;
}
button.dtsp-clearAll,
button.dtsp-collapseAll,
button.dtsp-showAll {
border: 0;
padding: var( --space-xs ) var( --space-sm );
font-weight: var( --font-weight-medium );
border-radius: var( --border-radius--small );
color: var( --color-base--emphasized );
&:hover {
background-color: var( --background-color-quiet--hover );
border-radius: var( --border-radius--small );
}
&:active {
background-color: var( --background-color-quiet--active );
}
}
button.dtsp-disabledButton {
background-color: transparent !important;
color: var( --color-base--subtle );
display: none;
}
div.dtsp-searchPanes {
gap: var( --space-xs );
div.dtsp-searchPane {
margin-top: 0 !important;
border: 1px solid var( --border-color-base );
border-radius: var( --border-radius--medium );
height: fit-content;
font-size: var( --font-size-small );
// Hidden pane
&:has( .dtsp-hidden ) {
.dtsp-topRow {
background-color: transparent;
.dtsp-disabledButton {
visibility: hidden;
}
}
}
div.dtsp-topRow {
min-height: auto;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
background-color: var( --color-surface-2 );
div.dtsp-searchCont input.dtsp-search {
padding-left: var( --space-sm );
border-radius: var( --border-radius--small );
}
}
input.dtsp-paneInputButton {
&::placeholder {
color: var( --color-base--subtle );
}
}
button.dtsp-paneButton {
opacity: var( --opacity-icon-base );
filter: var( --filter-invert );
&:hover {
opacity: var( --opacity-icon-base--hover );
}
&:active {
opacity: var( --opacity-icon-base--active );
}
}
input.dtsp-paneInputButton,
button.dtsp-paneButton {
margin: 0;
width: 36px;
height: 40px;
border-radius: var( --border-radius--small );
&:hover {
background-color: var( --background-color-quiet--hover );
}
}
button.dtsp-searchIcon {
background-size: 14px;
}
// Text buttons
button.clearButton {
font-size: 28px;
}
button.dtsp-collapseButton span.dtsp-caret {
font-size: 24px;
}
button.clearButton,
button.dtsp-collapseButton span.dtsp-caret {
// Force to be black to work with filter
color: #000;
vertical-align: middle;
font-weight: var( --font-weight-medium );
}
button.dtsp-collapseButton span.dtsp-caret {
top: 4px;
}
button.dtsp-disabledButton {
opacity: var( --opacity-base--disabled ) !important;
}
}
}
div.dataTables_wrapper div.dataTables_scrollBody {
background: transparent !important;
table {
tr>th,
tr>td {
padding: var( --space-xs ) var( --space-sm );
}
}
td.dtsp-nameColumn {
&:hover {
background-color: var( --background-color-quiet--hover );
}
}
div.dtsp-nameCont span.dtsp-pill {
background: var( --color-surface-2 );
border: 1px solid var( --border-color-base );
color: var( --color-base );
font-size: var( --font-size-x-small );
}
}
}