sortable tables/mw-collapsible no longer causes page jump
Relatively straightforwardly - we move padding-right definition into
top styles to avoid a reflow
This turned out to be a little tricker than first imagined.
The code in jquery.makeCollapsible.js finds elements marked up
as collapsible and then 1) collapses them 2) inserts a toggle button.
To avoid a reflow on the page, we have to make sure the collapsed content
is collapsed prior to the code running and reserve space for the toggle
The toggle button is tricky as it is subject to i18n. However we can
access this label via a LESS variable and use a pseudo element (which
is supported by the majority of modern browsers) to preserve the space
Note on slow connections, collapsed content will not be accessible until
then the existing reflows.
Note, there are many many many usages of mw-collapsible, because of this
this does not claim to address all reflows in all usages - but it does provide
support for the more widespread usages.
Follow up patches can be added for specific situations - for example table
of contents toggle.