mediawiki-skins-Citizen/skinStyles/extensions/SemanticMediaWiki/smw.tableprinter.datatable.less
github-actions 5d78425119 ci: 👷 lint code to MediaWiki standards
Check commit and GitHub actions for more details
2023-07-17 00:50:06 +00:00

345 lines
10 KiB
Plaintext

/*
* Citizen
*
* SkinStyles for Extension:SemanticMediaWiki
* Module: smw.tableprinter.datatable
* Version: 4.1.1 (8c09283)
*
* Date: 2023-07-16
*/
.smw-datatable {
margin-top: var( --space-md );
margin-bottom: var( --space-md );
}
.smw-datatable table.dataTable {
margin-bottom: var( --space-md );
}
.smw-datatable table.dataTable.no-footer {
border-bottom-color: var( --border-color-base );
}
.smw-datatable table.dataTable tfoot td {
border-top-color: var( --border-color-base );
// padding: 10px 18px 10px 10px;
border-bottom-color: var( --border-color-base );
}
.smw-datatable table.dataTable.compact tfoot th,
.smw-datatable table.dataTable.compact tfoot td {
border-top-color: var( --border-color-base );
// padding: 4px;
border-bottom-color: var( --border-color-base );
}
.smw-datatable table.dataTable thead th,
.smw-datatable table.dataTable thead td,
.smw-datatable table.data.smw-datatable table.compact thead th,
.smw-datatable table.data.smw-datatable table.compact thead td,
.smw-datatable table.data.smw-datatable table.no-footer {
border-bottom-color: var( --border-color-base );
}
.smw-datatable table.dataTable thead th,
.smw-datatable table.dataTable thead td,
.smw-datatable table.data.smw-datatable table.compact thead th,
.smw-datatable table.data.smw-datatable table.compact thead td {
border-top: 0; // already covered by wikitable styles
}
.smw-datatable .dataTables_wrapper select,
.smw-datatable .dataTables_wrapper .dataTables_filter input {
border: 1px solid var( --border-color-base );
color: var( --color-base--emphasized );
}
.smw-datatable .dataTables_wrapper .dataTables_paginate .paginate_button {
border-color: var( --border-color-base );
border-radius: var( --border-radius--small ) !important;
color: var( --color-base--emphasized ) !important;
font-weight: var( --font-weight-medium ) !important;
transition: none !important;
}
.smw-datatable .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.smw-datatable .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
border-color: transparent;
background: var( --background-color-primary--active );
color: var( --color-base--emphasized ) !important;
pointer-events: none;
}
.smw-datatable .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
border-color: transparent;
background: var( --background-color-quiet--hover );
}
.smw-datatable .dataTables_wrapper select:focus,
.smw-datatable .dataTables_wrapper select:active,
.smw-datatable .dataTables_wrapper .dataTables_filter input:focus,
.smw-datatable .dataTables_wrapper .dataTables_filter input:active {
border-color: var( --color-primary );
}
.smw-datatable-toolbar .smw-dropdown {
button {
border-color: var( --border-color-base );
}
}
/* Sync with ext.cargo.datatables */
table.dataTable {
overflow: auto;
max-width: 100%;
font-size: 0.875rem;
}
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 );
border-bottom-color: var( --border-color-base );
color: var( --color-base--subtle );
font-size: 0.8125rem;
font-weight: var( --font-weight-normal );
letter-spacing: 0.05em;
text-align: start;
}
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 );
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
border-radius: var( --border-radius--small );
color: var( --color-base--emphasized ) !important;
font-weight: var( --font-weight-medium );
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
border-color: transparent;
background: var( --background-color-primary--active );
color: var( --color-base--emphasized ) !important;
}
.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 {
border-color: transparent;
background: var( --background-color-quiet--hover );
color: var( --color-base--emphasized ) !important;
}
.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 {
color: var( --color-base );
font-size: 0.875rem;
}
.dataTables_wrapper .dataTables_filter + .dataTable {
// Add top border as divider if there are filter on top
border-top: 1px solid var( --border-color-base );
}