MediaWiki:Gadget-responsive-tables.css: Difference between revisions
Jump to navigation
Jump to search
(Created page with ".c-responsive-table { margin-bottom: 20px; } .c-responsive-table__toolbar { margin-bottom: 2px; } .c-responsive-table__toolbar-button { display: inline-block;...") |
No edit summary |
||
Line 1: | Line 1: | ||
.c-responsive-table { | .c-responsive-table { | ||
margin-bottom: 20px; | margin-bottom: 20px; | ||
max-width: -moz-fit-content; | |||
max-width: fit-content; | |||
} | } | ||
.c-responsive-table__toolbar { | .c-responsive-table__toolbar { | ||
Line 27: | Line 29: | ||
} | } | ||
.c-responsive-table__scroll { | .c-responsive-table__scroll { | ||
overflow-y: auto; | overflow-y: auto; | ||
overflow-x: auto; | overflow-x: auto; | ||
max-height: 50vh; | max-height: 50vh; | ||
} | } | ||
Line 48: | Line 47: | ||
.c-responsive-table__table tr:first-of-type th { | .c-responsive-table__table tr:first-of-type th { | ||
position: sticky; | position: sticky; | ||
top: | top: 0; | ||
} | } | ||
/* | |||
@ | /* Webkit hack to prevent row of pixels visible above table header when scrolled down. */ | ||
@supports (-webkit-appearance:none) { | |||
.c-responsive-table__table tr:first-of-type th { | .c-responsive-table__table tr:first-of-type th { | ||
top: -1px; | top: -1px; | ||
} | |||
} | |||
/* Mozilla hack to fix unnecessary horizontal scrollbar. */ | |||
@media screen and (min--moz-device-pixel-ratio:0) { | |||
.c-responsive-table__scroll { | |||
padding-right: 18px; | |||
} | } | ||
} | } |
Revision as of 14:48, 29 November 2021
.c-responsive-table {
margin-bottom: 20px;
max-width: -moz-fit-content;
max-width: fit-content;
}
.c-responsive-table__toolbar {
margin-bottom: 2px;
}
.c-responsive-table__toolbar-button {
display: inline-block;
margin-right: 0.4em;
border: none;
font-size: 12px;
color: #7c8489;
background: #27292a;
}
.c-responsive-table__toolbar-button:hover,
.c-responsive-table__toolbar-button:focus {
color: #a5b2bb;
text-shadow: none;
background: #343738;
}
.c-responsive-table__toolbar-button svg {
display: inline-block;
margin-right: 0.2em;
vertical-align: -.125em;
width: 1em;
height: 1em;
}
.c-responsive-table__scroll {
overflow-y: auto;
overflow-x: auto;
max-height: 50vh;
}
@media screen and (min-height: 600px) {
.c-responsive-table__scroll {
max-height: 25vh;
}
}
.c-responsive-table.is-expanded .c-responsive-table__scroll {
max-height: none !important;
overflow-y: visible;
}
.c-responsive-table__table {
margin: 0 !important;
}
.c-responsive-table__table tr:first-of-type th {
position: sticky;
top: 0;
}
/* Webkit hack to prevent row of pixels visible above table header when scrolled down. */
@supports (-webkit-appearance:none) {
.c-responsive-table__table tr:first-of-type th {
top: -1px;
}
}
/* Mozilla hack to fix unnecessary horizontal scrollbar. */
@media screen and (min--moz-device-pixel-ratio:0) {
.c-responsive-table__scroll {
padding-right: 18px;
}
}