mediawiki-skins-Vector/variables.less
Stephen Niedzielski 5195f5fd67 [feature] add menu button to toggle panel visibility
Add a menu button that toggles the panel's (also referred to as a
sidebar) collapse state. When the screen is wide enough, animate the
transition.

The menu icon from OOUI is copied into Vector to avoid two
ResourceLoaders modules (collapseHorizontal icon isn't ready for
inclusion in the OOUI icon pack and ResourceLoaderOOUIIconPackModule
doesn't support images).

Additional polish and collaboration is needed but this patch fulfills
the scope of its referenced task.

Bug: T246419
Depends-On: I8e153c0ab927f9d880a68fb9efb0bf37b91d26b2
Change-Id: Ic9d54de7e19ef8d5dfd703d95a45b78c0aaf791a
2020-05-28 02:14:13 +00:00

143 lines
5.2 KiB
Plaintext

@import 'mediawiki.ui/variables.less';
@font-size-root: 100%;
@font-size-browser: 16; // Assumed browser default of `16px`
//
// == Typography ==
//
// Detailed documentation of the font choices:
// https://www.mediawiki.org/wiki/Wikimedia_User_Interface/Use_cases/Font_family_stack
// Source of this font stack definition in WikimediaUI Base:
// https://phabricator.wikimedia.org/source/wikimedia-ui-base/browse/master/wikimedia-ui-base.less$202
// See T73240 for a related discussion concerning the serif font stack.
// Note: Numbers in Georgia font are non-lining, the font-feature to change this is documented at:
// https://www.mediawiki.org/wiki/Talk:Typography_refresh/Archive_2#Numbers_looks_weird_in_article_title
@font-family-serif:
'Linux Libertine', // GNU+Linux, alternative to Times New Roman.
'Georgia', // Windows, intended as a serif typeface that would appear elegant but
// legible printed small or on low-resolution screens.
'Times', // Windows, very similar to Times New Roman with subtle differences.
serif; // Platform default: 'Times New Roman' on Windows.
//
// Body content uses the user setting in browser / the system default sans-serif font:
// Arial on Windows, Roboto on Android.
// FIXME: Use WikimediaUI Base's OS specific default sans-serif fonts.
@font-family-sans: sans-serif;
// Fallback for headings, language: ja,he,ko. See T73240,T65817,T65843,T65844,T65827.
@font-family-sans--fallback: sans-serif;
//
// == Page content ==
//
@background-color-base: #fff;
@color-base: #202122;
@color-base--emphasized: #000;
@color-link: #0645ad;
@color-link--visited: #0b0080;
@color-link-new: #a55858;
@color-link-selected: @color-base;
// See oojs/ui/src/themes/wikimediaui/common.less.
@background-color-frameless--hover: rgba( 0, 24, 73, 7/255 ); // equivalent to @wmui-color-base90 on white
@color-primary: #36c; // wikimedia-ui-base.less
@font-size-base: unit( 14 / @font-size-browser, em ); // Equals `0.875em`.
@font-size-reset: @font-size-root;
@font-size-heading-1: 1.8em;
@font-size-heading-2: 1.5em;
@font-size-heading-3: 1.2em;
@font-size-notification: 0.8em;
@font-size-site-notice: 0.8em;
@font-size-footer: unit( 12 / @font-size-browser, em );
@line-height-base: 1.6;
@line-height-heading: 1.3;
@line-height-code: 1.3;
@line-height-footer-info: 1.4;
@line-height-footer-buttons: 2;
// FIXME: Use global variable since Echo and CentralNotice use this variable
@border-color-content: #a7d7f9;
// Due to darker background gradient, border needs to be darkened for aligned visual perception.
@border-color-content--tabs-inactive: darken( @border-color-content, 10% );
@padding-content: 1em;
// Navigation
@background-color-secondary: #f6f6f6;
@color-nav-subtle: #444;
// Navigation `line-height` has to be set in `em`s due to a rendering calculation issue.
@line-height-nav: 1.125em;
// Navigation: Main
@font-size-nav-main: inherit;
@font-size-nav-main-heading: unit( 12 / @font-size-browser, em ); // Equals `0.75em`.
@font-size-nav-main-body: unit( 12 / @font-size-browser, em );
@margin-start-nav-main-body: 0.5em;
// Navigation: Portal
// Font size of the Portal links.
@font-size-portal-list-item: @font-size-nav-main-body;
// Margin space from the start of the Portal (left edge in LTR
// languages).
@margin-start-portal: 0.7em;
// Margin space from the end of the Portal (right edge in LTR
// languages).
@margin-end-portal: 0.6em;
// Margin space from the start of the Portal body (left edge in LTR languages).
@margin-start-portal-body: @margin-start-nav-main-body;
// Navigation: Personal tools
@background-position-nav-personal-icon: left ( 4 / @font-size-browser / @font-size-nav-personal );
@background-size-nav-personal-icon: 14 / @font-size-browser / @font-size-nav-personal;
@top-personal-tools: 6px;
@font-size-nav-personal: 0.75em;
// Using `unit()` without second parameter to achieve a unitless output for `line-height`.
@line-height-nav-personal: unit( 14 / @font-size-browser / @font-size-nav-personal ); // Equals `1.667`.
// Tabs
@font-size-tabs: unit( 13 / @font-size-browser, em ); // Equals `0.8125em`.
// Search
@width-search-button: 24 / @font-size-browser / @font-size-search-input;
@font-size-search-input: unit( 13 / @font-size-browser, em ); // Equals `0.8125em`.
// Z-indices
// See skinStyles/jquery.ui/jquery.ui.datepicker.css.
// @z-index-ui-datepicker-cover: -1;
@z-index-base: 0;
@z-index-header: 1;
@z-index-sidebar: 1;
@z-index-menu-checkbox: 1;
@z-index-search-button: 1;
// Ensure that this is displayed on top of .mw-body-content and clickable.
@z-index-indicators: 1;
// See skinStyles/jquery.ui/jquery.ui.slider.css.
// @z-index-ui-slider-range: 1;
// Menus must overlap indicators (@z-index-indicators) and VisualEditor toolbar (z-index: 2).
@z-index-menu: 2;
// See skinStyles/jquery.ui/jquery.ui.slider.css.
// @z-index-ui-slider-handle: 2;
// Display on top of page tabs (T39158, T50078).
@z-index-personal: 100;
@z-index-sidebar-button: 101;
// See skinStyles/jquery.ui/jquery.ui.selectable.css.
// @z-index-ui-selectable-helper: 100;
@z-index-overlay: 101;
// See skinStyles/jquery.ui/jquery.ui.tooltip.css.
// @z-index-ui-tooltip: 9999;
// Transitions
@transition-duration-base: 100ms;
@size-sidebar-button: 2.75em; // 44px