mediawiki-extensions-Visual.../modules/ve-mw/init/styles/ve.init.mw.ViewPageTarget.css

65 lines
1.7 KiB
CSS
Raw Normal View History

JSDuck: Generated code documentation! See CODING.md for how to run it. Mistakes fixed: * Warning: Unknown type function -> Function * Warning: Unknown type DOMElement -> HTMLElement * Warning: Unknown type DOM Node -> HTMLElement * Warning: Unknown type Integer -> Mixed * Warning: Unknown type Command -> ve.Command * Warning: Unknown type any -> number * Warning: Unknown type ve.Transaction -> ve.dm.Transaction * Warning: Unknown type ve.dm.AnnotationSet -> ve.AnnotationSet * Warning: Unknown type false -> boolean * Warning: Unknown type ve.dm.AlienNode ve.dm doesn't have a generic AlienNode like ve.ce -> Unknown type ve.dm.AlienInlineNode|ve.dm.AlienBlockNode * Warning: Unknown type ve.ve.Surface -> ve.ce.Surface * ve.example.lookupNode: -> Last @param should be @return * ve.dm.Transaction.prototype.pushReplace: -> @param {Array] should be @param {Array} * Warning: ve.BranchNode.js:27: {@link ve.Node#hasChildren} links to non-existing member -> (removed) * Warning: ve.LeafNode.js:21: {@link ve.Node#hasChildren} links to non-existing member -> (removed) Differences fixed: * Variadic arguments are like @param {Type...} [name] instead of @param {Type} [name...] * Convert all file headers from /** to /*! because JSDuck tries to parse all /** blocks and fails to parse with all sorts of errors for "Global property", "Unnamed property", and "Duplicate property". Find: \/\*\*([^@]+)(@copyright) Replace: /*!$1$2 * Indented blocks are considered code examples. A few methods had documentation with numbered lists that were indented, which have now been updated to not be intended. * The free-form text descriptions are parsed with Markdown, which requires lists to be separated from paragraphs by an empty line. And we should use `backticks` instead of {braces} for inline code in text paragraphs. * Doc blocks for classes and their constructor have to be in the correct order (@constructor, @param, @return must be before @class, @abstract, @extends etc.) * `@extends Class` must not have Class {wrapped} * @throws must start with a {Type} * @example means something else. It is used for an inline demo iframe, not code block. For that simply indent with spaces. * @member means something else. Non-function properties are marked with @property, not @member. * To create a link to a class or member, in most cases the name is enough to create a link. E.g. Foo, Foo.bar, Foo.bar#quux, where a hash stands for "instance member", so Foo.bar#quux, links to Foo.bar.prototype.quux (the is not supported, as "prototype" is considered an implementation detail, it only indexes class name and method name). If the magic linker doesn't work for some case, the verbose syntax is {@link #target label}. * @property can't have sub-properties (nested @param and @return values are supported, only @static @property can't be nested). We only have one case of this, which can be worked around by moving those in a new virtual class. The code is unaltered (only moved down so that it isn't with the scope of the main @class block). ve.dm.TransactionProcessor.processors. New: * @mixins: Classes mixed into the current class. * @event: Events that can be emitted by a class. These are also inherited by subclasses. (+ @param, @return and @preventable). So ve.Node#event-attach is inherited to ve.dm.BreakNode, just like @method is. * @singleton: Plain objects such as ve, ve.dm, ve.ce were missing documentation causing a tree error. Documented those as a JSDuck singleton, which they but just weren't documented yet. NB: Members of @singleton don't need @static (if present, triggers a compiler warning). * @chainable: Shorthand for "@return this". We were using "@return {classname}" which is ambiguous (returns the same instance or another instance?), @chainable is specifically for "@return this". Creates proper labels in the generated HTML pages. Removed: * @mixin: (not to be confused with @mixins). Not supported by JSDuck. Every class is standalone anyway. Where needed marked them @class + @abstract instead. Change-Id: I6a7c9e8ee8f995731bc205d666167874eb2ebe23
2013-01-04 08:54:17 +00:00
/*!
* VisualEditor MediaWiki Initialization ViewPageTarget styles.
*
* @copyright 2011-2015 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
mw.ViewPageTarget: Use CSS instead of JS for DOM hiding/muting * 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. See eba7d58dd19d9. * 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
2015-02-05 01:45:19 +00:00
/*!
* 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
*/
mw.ViewPageTarget: Use CSS instead of JS for DOM hiding/muting * 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. See eba7d58dd19d9. * 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
2015-02-05 01:45:19 +00:00
.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;
}
mw.ViewPageTarget: Use CSS instead of JS for DOM hiding/muting * 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. See eba7d58dd19d9. * 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
2015-02-05 01:45:19 +00:00
.ve-activating #bodyContent,
.ve-activated #firstHeading,
.ve-activated #siteSub {
opacity: 0.6;
}
mw.ViewPageTarget: Use CSS instead of JS for DOM hiding/muting * 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. See eba7d58dd19d9. * 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
2015-02-05 01:45:19 +00:00
.ve-activated #firstHeading {
cursor: default;
}
Major UI refactoring and improvements Objective: Refactor UI widgets, improve usability and accessibility of menus, general cleanup and style improvements. Extras: Fixed documentation in a few other files to make descriptions of jQuery event arguments more consistent, classes inherit correctly, and made use of the @cfg functionality in jsduck. Changes: .docs/config.json * Added window, HTMLDocument, HTMLElement, DocumentFragment and XMLHttpRequest to externals, so jsduck doesn't throw warnings when they are used demos/ve/index.php, modules/ve/test/index.php, VisualEditor.php * Moved widgets above tools (since tools use widgets) demos/ve/index.php * Refactored widget initialization to use options * Renamed variables to match widget names ve.init.mw.ViewPageTarget.css * Adjusted text sizes to make widgets work normally * Added margins for buttons in toolbar (since button widgets don't have any) * Removed styles for init buttons (button widgets now) ve.init.mw.ViewPageTarget.js * Switched to using button widgets (involved moving things around a bit) ve.ui.LinkInspector.js, ve.ui.MWLinkInspector.js * Renamed static property "inputWidget" to "linkTargetInputWidget" to better reflect the required base class for the properties value icons.ai, check.png, check.svg * Added "check" icon, used in menu right now to show which item is selected ve.ui.Icons-raster.css, ve.ui.Icons-vector.css * Added check icon * Removed :before pseudo selectors from most of the icon classes (not need by button tool anymore, makes them more reusable now) ve.ui.Tool.css * Adjusted drop down tool styles so menu appears below, instead of on top, of the label * Adjusted paragraph font size to better match actual content * Updated class names to still work with menu widget changes (items are their own widgets now) * Updated selectors as per changes in the structure of button tools ve.ui.Widget.css * Added styles for buttons and menu items * Adjusted menu styles ve.ui.*ButtonTool.js * Added config options argument passthrough ve.ui.ButtonTool.js * Moved var statement to the top inside constructor * Switched to using "a" tag to get cross-browser :active support * Added icon to inside of button to make icon styles more reusable * Removed disabled support (now provided by widget parent class) ve.ui.FormatDropDownTool.js * Updated options initialization to construct menu item objects * Modified handling of items to account for changes in menu and item classes * Optimized onUpdateState method a bit, adding early exit to inner loop ve.ui.ButtonTool.js, ve.ui.DropdownTool.js, ve.ui.Context.js, ve.ui.Frame, ve.ui.Tool.js, ve.ui.Widget.js * Added chain ability to non-getter methods ve.ui.DropdownTool.js * Removed items argument to constructor * Updated code as per changes in menu class * Fixed inconsistent naming of event handler methods * Removed item event handling (now handled by items directly) * Made use of this.$$ to ensure tool works in other frames ve.ui.Tool.js * Made tools inherit from widget * Moved trigger registry event handler to a method ve.ui.Context.js * Switched from using menu to contain toolbar to a simple wrapper ve.ui.js * Added get$$ method, a convenience function for binding jQuery to a specific document context ve.ui.*Widget.js * Switched to using a config options object instead of individual arguments * Added options * Factored out flags and labels into their own classes * Refactored value setting methods for inputs ve.ui.MenuWidget.js, ve.ui.MenuItemWidget.js * Broke items out into their own classes * Redesigned API * Updated code that uses these classes * Added support for keyboard interaction * Made items flash when selected (delaying the hiding of the menu for 200ms) ve.ui.LinkTargetInputWidget.js, ve.ui.MWLinkTargetInputWidget * Refactored annotation setting methods Change-Id: I7769bd5a5b79f1ab36f258ef9f2be583ca503ce6
2013-02-20 23:25:12 +00:00
/* 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;
Major UI refactoring and improvements Objective: Refactor UI widgets, improve usability and accessibility of menus, general cleanup and style improvements. Extras: Fixed documentation in a few other files to make descriptions of jQuery event arguments more consistent, classes inherit correctly, and made use of the @cfg functionality in jsduck. Changes: .docs/config.json * Added window, HTMLDocument, HTMLElement, DocumentFragment and XMLHttpRequest to externals, so jsduck doesn't throw warnings when they are used demos/ve/index.php, modules/ve/test/index.php, VisualEditor.php * Moved widgets above tools (since tools use widgets) demos/ve/index.php * Refactored widget initialization to use options * Renamed variables to match widget names ve.init.mw.ViewPageTarget.css * Adjusted text sizes to make widgets work normally * Added margins for buttons in toolbar (since button widgets don't have any) * Removed styles for init buttons (button widgets now) ve.init.mw.ViewPageTarget.js * Switched to using button widgets (involved moving things around a bit) ve.ui.LinkInspector.js, ve.ui.MWLinkInspector.js * Renamed static property "inputWidget" to "linkTargetInputWidget" to better reflect the required base class for the properties value icons.ai, check.png, check.svg * Added "check" icon, used in menu right now to show which item is selected ve.ui.Icons-raster.css, ve.ui.Icons-vector.css * Added check icon * Removed :before pseudo selectors from most of the icon classes (not need by button tool anymore, makes them more reusable now) ve.ui.Tool.css * Adjusted drop down tool styles so menu appears below, instead of on top, of the label * Adjusted paragraph font size to better match actual content * Updated class names to still work with menu widget changes (items are their own widgets now) * Updated selectors as per changes in the structure of button tools ve.ui.Widget.css * Added styles for buttons and menu items * Adjusted menu styles ve.ui.*ButtonTool.js * Added config options argument passthrough ve.ui.ButtonTool.js * Moved var statement to the top inside constructor * Switched to using "a" tag to get cross-browser :active support * Added icon to inside of button to make icon styles more reusable * Removed disabled support (now provided by widget parent class) ve.ui.FormatDropDownTool.js * Updated options initialization to construct menu item objects * Modified handling of items to account for changes in menu and item classes * Optimized onUpdateState method a bit, adding early exit to inner loop ve.ui.ButtonTool.js, ve.ui.DropdownTool.js, ve.ui.Context.js, ve.ui.Frame, ve.ui.Tool.js, ve.ui.Widget.js * Added chain ability to non-getter methods ve.ui.DropdownTool.js * Removed items argument to constructor * Updated code as per changes in menu class * Fixed inconsistent naming of event handler methods * Removed item event handling (now handled by items directly) * Made use of this.$$ to ensure tool works in other frames ve.ui.Tool.js * Made tools inherit from widget * Moved trigger registry event handler to a method ve.ui.Context.js * Switched from using menu to contain toolbar to a simple wrapper ve.ui.js * Added get$$ method, a convenience function for binding jQuery to a specific document context ve.ui.*Widget.js * Switched to using a config options object instead of individual arguments * Added options * Factored out flags and labels into their own classes * Refactored value setting methods for inputs ve.ui.MenuWidget.js, ve.ui.MenuItemWidget.js * Broke items out into their own classes * Redesigned API * Updated code that uses these classes * Added support for keyboard interaction * Made items flash when selected (delaying the hiding of the menu for 200ms) ve.ui.LinkTargetInputWidget.js, ve.ui.MWLinkTargetInputWidget * Refactored annotation setting methods Change-Id: I7769bd5a5b79f1ab36f258ef9f2be583ca503ce6
2013-02-20 23:25:12 +00:00
}