713d0ac2fd
Prior to this patch, Vector used a mixture of LESS media queries and ResourceLoader (RL) media queries[0]. So far as I can tell[1], the latter only instructs RL to wrap the contents of a LESS file within a query (there are no conditionals placed on style loading). Further, according to a coauthor of RL (Roan), RL media query support was most likely a replacement for `@media foo { @import foo.css }` to inline print styles from a separate style sheet which Vector itself does not use. The LESS solution is much more intuitive since it's not MediaWiki- specific and only the LESS code needs to be considered instead of LESS _and_ the RL configuration in skin.json. This patch moves both screen media queries to screen.less for the aforementioned consistency and to avoid nesting queries. It is hoped that these changes will help make future work easier, such as those to margin likely to take place in making the sidebar collapsible. [0]: https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader#Media_queries [1]: http://localhost:8181/w/load.php?debug=true&lang=en&modules=skins.vector.styles&only=styles&skin=vector Bug: T246419 Change-Id: Ic0adfa254f3e81dfa87a26899f3aa585645956f1 |
||
---|---|---|
.phan | ||
.storybook | ||
dev-scripts | ||
i18n | ||
includes | ||
resources | ||
screenshots | ||
skinStyles | ||
stories | ||
tests/phpunit | ||
.eslintignore | ||
.eslintrc.json | ||
.gitignore | ||
.gitreview | ||
.phpcs.xml | ||
.stylelintignore | ||
.stylelintrc.json | ||
.svgo.yml | ||
CODE_OF_CONDUCT.md | ||
composer.json | ||
COPYING | ||
Doxyfile | ||
hooks.txt | ||
jsdoc.json | ||
package-lock.json | ||
package.json | ||
README.md | ||
skin.json | ||
variables.less |
Vector Skin
Installation
See https://www.mediawiki.org/wiki/Skin:Vector.
Configuration options
See skin.json.
Development
Coding conventions
We strive for compliance with MediaWiki conventions:
https://www.mediawiki.org/wiki/Manual:Coding_conventions
Additions and deviations from those conventions that are more tailored to this project are noted at:
https://www.mediawiki.org/wiki/Reading/Web/Coding_conventions
URL query parameters
useskinversion
: Likeuseskin
but for overriding the Vector skin version user preference and configuration.
Skin preferences
Vector defines skin-specific user preferences. These are exposed on
Special:Preferences when the VectorShowSkinPreferences
configuration is
enabled. The user's preference state for skin preferences is used for skin
previews and any other operation unless specified otherwise.
Version
Vector defines a "version" preference to enable users who prefer the December
2019 version of Vector to continue to do so without any visible changes. This
version is called "Legacy Vector." The related preference defaults are
configurable via the configurations prefixed with VectorDefaultSkinVersion
.
Version preference and configuration may be overridden by the useskinversion
URL query parameter.