| 1 |
// Tables |
| 2 |
@import 'mediawiki.mixins.less'; |
| 3 |
@import '../../../minerva.less/minerva.variables.less'; |
| 4 |
@import '../../../minerva.less/minerva.mixins.less'; |
| 5 |
|
| 6 |
// FIXME: Upstream to ResourceLoader/SkinModule content-tables styles [T359888] |
| 7 |
// These are only intended for smaller screens. |
| 8 |
// This avoids having to undo them from another media query, |
| 9 |
// by putting the original in a media query instead. |
| 10 |
// This also avoids having a reset with too-high specificity, which |
| 11 |
// would break unrelated styles from core and extensions. |
| 12 |
@media all and ( max-width: @max-width-breakpoint-mobile ) { |
| 13 |
.content { |
| 14 |
table { |
| 15 |
display: block; |
| 16 |
width: 100% !important; |
| 17 |
box-sizing: border-box; |
| 18 |
|
| 19 |
&.wikitable { |
| 20 |
// Remove the outer table border as the table container may be |
| 21 |
// wider than all the cells (T206762). In most cases the table |
| 22 |
// border is not visible anyway due to border-collapse. |
| 23 |
border: 0; |
| 24 |
} |
| 25 |
} |
| 26 |
|
| 27 |
caption { |
| 28 |
display: block; |
| 29 |
} |
| 30 |
} |
| 31 |
} |
| 32 |
|
| 33 |
.content { |
| 34 |
table { |
| 35 |
margin: 1em 0; |
| 36 |
|
| 37 |
/* following 4 rules are needed for scrolling */ |
| 38 |
overflow: auto; /* for browsers that don't support overflow-y */ |
| 39 |
overflow: auto hidden; |
| 40 |
} |
| 41 |
|
| 42 |
caption { |
| 43 |
font-weight: bold; |
| 44 |
text-align: left; |
| 45 |
} |
| 46 |
} |
| 47 |
|
| 48 |
// Overrides for ResourceLoaderSkinModule "content". |
| 49 |
.wikitable { |
| 50 |
// We only style cells that are direct children of the wikitable table since |
| 51 |
// table tags may be used for non-table purposes within the cells. |
| 52 |
> tr > th, |
| 53 |
> tr > td, |
| 54 |
> * > tr > th, |
| 55 |
> * > tr > td { |
| 56 |
// content-tables uses 0.2em 0.4em. Can these be consolidated? |
| 57 |
padding: 0.2em; |
| 58 |
} |
| 59 |
} |