mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-29 00:30:44 +00:00
62c1d64ad0
* Use .ve-activated for elements changed in activate() - hideReadOnlyContent() - mutePageContent() - mutePageTitle * Use .ve-active for elements changed in onSurfaceReady() - hidePageContent() * Set 've-activated' class from activate() instead of transformPage() to consolidate reflows and minimise DOM interaction. It's still in the same (synchronous) execution path, but a few statements earlier now. * Remove obsolete #toc wrapper. This <div> (with data property to distinguish it from potentially foreign parents in the future) was there to aid slideDown/slideUp animations, because those don't work well on table elements. Seeeba7d58dd1
. * Remove obsolete setTimeout in restorePageTitle(). The removal of .ve-init-mw-viewPageTarget-pageTitle was delayed by one second (introduced in Ibc3fa2fb7 /4cc88b9850
). This was to account for a jQuery animation we no longer use. * Remove unused '.ve-init-mw-viewPageTarget-transform-muted' * Remove unused '.ve-init-mw-viewPageTarget-transform' * Remove unused '.ve-init-mw-viewPageTarget-pageTitle' The resulting stylesheet exposes that we're not consistent in whether elements hide immediately (ve-activated) or once the surface is ready (ve-active). This is intentionally kept as-is within this commit. Of the different elements that had their opacity changed, only firstHeading was being animated. This animation was removed. Bug: T88590 Bug: T87160 Change-Id: I87033456f715d99a88425e38e8ac5171144f4ec8
70 lines
1.8 KiB
CSS
70 lines
1.8 KiB
CSS
/*!
|
|
* VisualEditor MediaWiki Initialization ViewPageTarget styles.
|
|
*
|
|
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
|
|
* @license The MIT License (MIT); see LICENSE.txt
|
|
*/
|
|
|
|
/*!
|
|
* State | <html> classes
|
|
* Reading | ve-available
|
|
* Activate editor | ve-available ve-activated ve-activating
|
|
* Active | ve-available ve-activated ve-active
|
|
* Deactivate editor | ve-available ve-deactivating
|
|
* Deactivated | ve-available
|
|
*/
|
|
|
|
.ve-activated #contentSub,
|
|
.ve-activated #toc,
|
|
/* Most of bodyContent can be hidden as VE has an equivalent of most children
|
|
in ve-init-target (sibling of #bodyContent). However, we can't hide it
|
|
completely as #siteSub should remain visible (for persistence with read mode),
|
|
and ve-ui-mwTocWidget is also part of #bodyContent. */
|
|
.ve-active #bodyContent > :not(#siteSub):not(.ve-ui-mwTocWidget),
|
|
.ve-active #t-print,
|
|
.ve-active #t-permalink,
|
|
.ve-active #p-coll-print_export,
|
|
.ve-active #t-cite {
|
|
display: none;
|
|
}
|
|
|
|
.ve-activating #bodyContent,
|
|
.ve-activated #firstHeading,
|
|
.ve-activated #siteSub {
|
|
opacity: 0.6;
|
|
}
|
|
|
|
.ve-activated #firstHeading {
|
|
cursor: default;
|
|
}
|
|
|
|
/* Toolbar */
|
|
|
|
.ve-init-mw-viewPageTarget-toolbar-utilities,
|
|
.ve-init-mw-viewPageTarget-toolbar-actions {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.ve-init-mw-viewPageTarget-toolbar-actions {
|
|
font-size: 0.8em;
|
|
vertical-align: top;
|
|
padding: 0.25em;
|
|
}
|
|
|
|
.ve-init-mw-viewPageTarget-toolbar-utilities > .oo-ui-buttonElement-frameless {
|
|
margin-right: 0.2em;
|
|
margin-top: 0.2em;
|
|
}
|
|
|
|
.ve-init-mw-viewPageTarget-toolbar-actions > .oo-ui-buttonElement-framed {
|
|
margin-left: 0.25em;
|
|
margin-right: 0.25em;
|
|
margin-top: 0.2em;
|
|
}
|
|
|
|
/* Needs to override .oo-ui.widget.oo-ui-widget-disabled */
|
|
.ve-init-mw-viewPageTarget-waiting.oo-ui-widget.oo-ui-widget-disabled {
|
|
cursor: progress;
|
|
}
|