Skip to content

Commit

Permalink
fix(core): 🐛 remove table border expansion before the JS is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair3149 committed May 27, 2024
1 parent c1582a8 commit cb1cfde
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
1 change: 1 addition & 0 deletions resources/skins.citizen.scripts/overflowElements.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ class OverflowElement {
* @return {void}
*/
function init( bodyContent ) {
// Do not wrap nested tables
const tables = bodyContent.querySelectorAll( 'table:not( table table )' );

// Wrap tables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
// Responsive table for no js
// Avoid clipping when script is not yet loaded
// TODO: Revisit on MW 1.43 since Minerva table styles are merged upstream
table {
display: block;
overflow-x: auto;
max-width: max-content; // Needed for the border
}

// JS-enhanced responsive table
.citizen-table-wrapper {
overflow-x: auto;
// Elements enhanced by overflowElements.js
.citizen-overflow {
&-wrapper {
overflow-x: auto;

table {
display: table;
overflow: initial;
table {
display: table;
overflow: initial;
}
}
}

// TODO: Move this out of tables styles when this is used by more stuff
.citizen-overflow {
&--left {
-webkit-mask-image: linear-gradient( 90deg, transparent, #000 15% );
mask-image: linear-gradient( 90deg, transparent, #000 15% );
Expand Down
2 changes: 1 addition & 1 deletion resources/skins.citizen.styles/skin.less
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
@import 'components/StickyHeader.less';
@import 'components/Sitestats.less';
@import 'components/Sections.less';
@import 'components/Tables.less';
@import 'components/OverflowElements.less';
@import 'components/UserInfo.less';

// Mediawiki.skinning
Expand Down

0 comments on commit cb1cfde

Please sign in to comment.