Merge "Exactly match collapsible logic of jquery.makeCollapsible"

This commit is contained in:
jenkins-bot 2019-12-13 15:42:46 +00:00 committed by Gerrit Code Review
commit 95a46f1666
2 changed files with 28 additions and 14 deletions

View file

@ -686,7 +686,7 @@
"modules/ve-mw/init/ve.init.mw.trackSubscriber.js"
],
"styles": [
"modules/ve-mw/init/styles/ve.init.mw.Target.css"
"modules/ve-mw/init/styles/ve.init.mw.Target.less"
],
"dependencies": [
"mediawiki.String",

View file

@ -26,22 +26,36 @@
/* Override MediaWiki's styles that make sense in read mode only */
/* Prevent jQuery.makeCollapsible from hiding the rows, even if collapsed by default */
.client-js .ve-ce-mwTableNode.mw-collapsed:not( .mw-made-collapsible ) tr:not( :first-child ),
.client-js .ve-ui-diffElement table.mw-collapsed:not( .mw-made-collapsible ) tr:not( :first-child ) {
display: table-row;
// Prevent jQuery.makeCollapsible from hiding things, even if collapsed by default.
// These selectors must exactly match those in jquery.makeCollapsible.styles.less in MediaWiki.
@exclude: ~'.mw-made-collapsible';
.client-js {
.ve-ce-surface,
.ve-ui-diffElement {
.mw-collapsed:not( @{exclude} ) {
> p {
display: block;
}
.client-js .ve-ce-mwTableNode.mw-collapsed:not( .mw-made-collapsible ) > thead + tbody,
.client-js .ve-ui-diffElement table.mw-collapsed:not( .mw-made-collapsible ) > thead + tbody {
> table {
display: table;
}
> thead + tbody {
display: table-row-group;
}
/* Prevent jQuery.makeCollapsible from hiding blocks */
.client-js .ve-ce-surface .mw-collapsed:not( .mw-made-collapsible ) .mw-collapsible-content,
.client-js .ve-ui-diffElement .mw-collapsed:not( .mw-made-collapsible ) .mw-collapsible-content {
tr:not( :first-child ) {
display: table-row;
}
.mw-collapsible-content {
display: block;
}
}
}
}
/*
* Grey out the fake toggles to make it more obvious they are not interactive.