2020-04-28 01:44:16 +00:00
|
|
|
// Layout rules divide the page into sections and how VectorComponents should be arranged in the skin.
|
|
|
|
// The rules here should only define the layout, not color or typography.
|
|
|
|
|
|
|
|
@import '../../variables.less';
|
|
|
|
@import 'mediawiki.mixins.less';
|
|
|
|
|
|
|
|
// Modern layout variables
|
2020-06-11 21:02:04 +00:00
|
|
|
@height-tabs: 2.5em; // Keep in sync with .vector-menu-tabs height.
|
[modern] A new version of Vector with a new logo
Changes to support feature:
* ResourceLoaderSkinModule logo features are dropped
* New layout provided given the fork in layout between legacy and new.
* Legacy sidebar styles now pulled out
* breakpoint styles are not carried over from legacy Vector
The new Vector layout for now has one breakpoint.
Changes to storybook:
* The storybook script now pulls down image assets so that the logos can
be shown in storybook. The script is adjusted to make use of a static folder to
serve these images.
Note:
* The legacy mode is not touched as part of this patchset.
* The personal menu is unaffected by this patch and is out of scope.
* The alignment issue is noted, but will be solved at a later date.
* Changes to portal are out of scope.
* Adding storybook for modern descoped, given its not possible to load
both legacy layout and modern layout inside a storybook at current time.
Sample config:
$wgLogos = [
'icon' => 'https://di-logo-sandbox.firebaseapp.com/img/globe.png',
'tagline' => [
'src' => 'https://di-logo-sandbox.firebaseapp.com/img/tagline/en-tagline-117-13.svg',
'width' => 117,
'height' => 13,
],
'1x' => 'https://en.wikipedia.org/static/images/project-logos/enwiki.png',
'wordmark' => [
'src' => 'https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg',
'width' => 116,
'height' => 18,
],
];
Coauthor: Aron Manning
Bug: T246170
Change-Id: Ibc4b055150761388a6b78f9127da342c451ce0e7
2020-03-09 05:51:00 +00:00
|
|
|
@margin-top-sidebar: 0.5em;
|
2020-04-28 01:44:16 +00:00
|
|
|
|
|
|
|
// Header sizes defined in the description of T246170 and comment T246170#5957100
|
[modern] A new version of Vector with a new logo
Changes to support feature:
* ResourceLoaderSkinModule logo features are dropped
* New layout provided given the fork in layout between legacy and new.
* Legacy sidebar styles now pulled out
* breakpoint styles are not carried over from legacy Vector
The new Vector layout for now has one breakpoint.
Changes to storybook:
* The storybook script now pulls down image assets so that the logos can
be shown in storybook. The script is adjusted to make use of a static folder to
serve these images.
Note:
* The legacy mode is not touched as part of this patchset.
* The personal menu is unaffected by this patch and is out of scope.
* The alignment issue is noted, but will be solved at a later date.
* Changes to portal are out of scope.
* Adding storybook for modern descoped, given its not possible to load
both legacy layout and modern layout inside a storybook at current time.
Sample config:
$wgLogos = [
'icon' => 'https://di-logo-sandbox.firebaseapp.com/img/globe.png',
'tagline' => [
'src' => 'https://di-logo-sandbox.firebaseapp.com/img/tagline/en-tagline-117-13.svg',
'width' => 117,
'height' => 13,
],
'1x' => 'https://en.wikipedia.org/static/images/project-logos/enwiki.png',
'wordmark' => [
'src' => 'https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg',
'width' => 116,
'height' => 18,
],
];
Coauthor: Aron Manning
Bug: T246170
Change-Id: Ibc4b055150761388a6b78f9127da342c451ce0e7
2020-03-09 05:51:00 +00:00
|
|
|
@padding-left-sidebar: 0.5em;
|
|
|
|
@padding-horizontal-header: @margin-end-portal +
|
|
|
|
@padding-left-sidebar +
|
|
|
|
( @margin-start-nav-main-body / @font-size-nav-main-heading );
|
|
|
|
@padding-vertical-header: 0.125em;
|
|
|
|
@margin-top-header: 0.625em;
|
|
|
|
@margin-bottom-header: 0.3125em;
|
|
|
|
@height-logo-icon: 3.125em; // Logo sizes per specification in T245190.
|
|
|
|
@height-header: @height-logo-icon +
|
|
|
|
@margin-top-header + @margin-bottom-header +
|
|
|
|
2 * @padding-vertical-header;
|
2020-04-28 01:44:16 +00:00
|
|
|
@width-grid-column-one: 11em;
|
|
|
|
|
2020-04-09 19:16:36 +00:00
|
|
|
body {
|
2020-05-08 01:21:49 +00:00
|
|
|
// General background/foreground color definition as one exception to the rule.
|
|
|
|
background-color: @background-color-base;
|
|
|
|
color: @color-base;
|
|
|
|
// Vertical scrollbar always visible.
|
2020-04-09 19:16:36 +00:00
|
|
|
overflow-y: scroll;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-body,
|
|
|
|
.parsoid-body {
|
|
|
|
direction: ltr;
|
|
|
|
padding: @padding-content;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-body {
|
2020-05-07 13:38:16 +00:00
|
|
|
// Will be removed when we limit content width (T246420).
|
|
|
|
/* Border on top, left, and bottom side */
|
|
|
|
border: @border-width-base @border-style-base @border-color-content;
|
|
|
|
border-right-width: 0;
|
2020-04-09 19:16:36 +00:00
|
|
|
/* Merge the border with tabs' one (in their background image) */
|
|
|
|
margin-top: -@border-width-base;
|
|
|
|
|
|
|
|
.firstHeading {
|
|
|
|
/* Change the default from mediawiki.skinning CSS to let indicators float into heading area */
|
|
|
|
overflow: visible;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-28 01:44:16 +00:00
|
|
|
/* Space for header above content */
|
|
|
|
.mw-header-placeholder {
|
|
|
|
// Reserve space for the absolute positioned header and tabs.
|
[modern] A new version of Vector with a new logo
Changes to support feature:
* ResourceLoaderSkinModule logo features are dropped
* New layout provided given the fork in layout between legacy and new.
* Legacy sidebar styles now pulled out
* breakpoint styles are not carried over from legacy Vector
The new Vector layout for now has one breakpoint.
Changes to storybook:
* The storybook script now pulls down image assets so that the logos can
be shown in storybook. The script is adjusted to make use of a static folder to
serve these images.
Note:
* The legacy mode is not touched as part of this patchset.
* The personal menu is unaffected by this patch and is out of scope.
* The alignment issue is noted, but will be solved at a later date.
* Changes to portal are out of scope.
* Adding storybook for modern descoped, given its not possible to load
both legacy layout and modern layout inside a storybook at current time.
Sample config:
$wgLogos = [
'icon' => 'https://di-logo-sandbox.firebaseapp.com/img/globe.png',
'tagline' => [
'src' => 'https://di-logo-sandbox.firebaseapp.com/img/tagline/en-tagline-117-13.svg',
'width' => 117,
'height' => 13,
],
'1x' => 'https://en.wikipedia.org/static/images/project-logos/enwiki.png',
'wordmark' => [
'src' => 'https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg',
'width' => 116,
'height' => 18,
],
];
Coauthor: Aron Manning
Bug: T246170
Change-Id: Ibc4b055150761388a6b78f9127da342c451ce0e7
2020-03-09 05:51:00 +00:00
|
|
|
height: @height-header + @height-tabs;
|
2020-04-28 01:44:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Header layout */
|
|
|
|
.mw-header {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
[modern] A new version of Vector with a new logo
Changes to support feature:
* ResourceLoaderSkinModule logo features are dropped
* New layout provided given the fork in layout between legacy and new.
* Legacy sidebar styles now pulled out
* breakpoint styles are not carried over from legacy Vector
The new Vector layout for now has one breakpoint.
Changes to storybook:
* The storybook script now pulls down image assets so that the logos can
be shown in storybook. The script is adjusted to make use of a static folder to
serve these images.
Note:
* The legacy mode is not touched as part of this patchset.
* The personal menu is unaffected by this patch and is out of scope.
* The alignment issue is noted, but will be solved at a later date.
* Changes to portal are out of scope.
* Adding storybook for modern descoped, given its not possible to load
both legacy layout and modern layout inside a storybook at current time.
Sample config:
$wgLogos = [
'icon' => 'https://di-logo-sandbox.firebaseapp.com/img/globe.png',
'tagline' => [
'src' => 'https://di-logo-sandbox.firebaseapp.com/img/tagline/en-tagline-117-13.svg',
'width' => 117,
'height' => 13,
],
'1x' => 'https://en.wikipedia.org/static/images/project-logos/enwiki.png',
'wordmark' => [
'src' => 'https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg',
'width' => 116,
'height' => 18,
],
];
Coauthor: Aron Manning
Bug: T246170
Change-Id: Ibc4b055150761388a6b78f9127da342c451ce0e7
2020-03-09 05:51:00 +00:00
|
|
|
// A height is set to account for projects where no icon is set.
|
|
|
|
height: @height-logo-icon;
|
|
|
|
margin: @margin-top-header 0 @margin-bottom-header;
|
|
|
|
padding: @padding-vertical-header @padding-horizontal-header;
|
2020-04-28 01:44:16 +00:00
|
|
|
// Vertical centering of header elements (IE>=11), requires flex.
|
|
|
|
// Non-flex fallback for IE<=9: float rule on the child elements.
|
|
|
|
.flex-display();
|
|
|
|
// https://caniuse.com/#search=align-items
|
|
|
|
align-items: center;
|
[modern] A new version of Vector with a new logo
Changes to support feature:
* ResourceLoaderSkinModule logo features are dropped
* New layout provided given the fork in layout between legacy and new.
* Legacy sidebar styles now pulled out
* breakpoint styles are not carried over from legacy Vector
The new Vector layout for now has one breakpoint.
Changes to storybook:
* The storybook script now pulls down image assets so that the logos can
be shown in storybook. The script is adjusted to make use of a static folder to
serve these images.
Note:
* The legacy mode is not touched as part of this patchset.
* The personal menu is unaffected by this patch and is out of scope.
* The alignment issue is noted, but will be solved at a later date.
* Changes to portal are out of scope.
* Adding storybook for modern descoped, given its not possible to load
both legacy layout and modern layout inside a storybook at current time.
Sample config:
$wgLogos = [
'icon' => 'https://di-logo-sandbox.firebaseapp.com/img/globe.png',
'tagline' => [
'src' => 'https://di-logo-sandbox.firebaseapp.com/img/tagline/en-tagline-117-13.svg',
'width' => 117,
'height' => 13,
],
'1x' => 'https://en.wikipedia.org/static/images/project-logos/enwiki.png',
'wordmark' => [
'src' => 'https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg',
'width' => 116,
'height' => 18,
],
];
Coauthor: Aron Manning
Bug: T246170
Change-Id: Ibc4b055150761388a6b78f9127da342c451ce0e7
2020-03-09 05:51:00 +00:00
|
|
|
z-index: @z-index-header;
|
2020-04-28 01:44:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Main column */
|
|
|
|
.mw-body,
|
|
|
|
#mw-data-after-content,
|
|
|
|
#left-navigation,
|
|
|
|
.mw-footer {
|
|
|
|
margin-left: @width-grid-column-one;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Content */
|
|
|
|
.mw-indicators {
|
|
|
|
float: right;
|
|
|
|
z-index: @z-index-indicators;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-body-content {
|
|
|
|
position: relative;
|
|
|
|
z-index: @z-index-base;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Hide, but keep accessible for screen-readers */
|
|
|
|
#mw-navigation h2 {
|
|
|
|
position: absolute;
|
|
|
|
top: -9999px;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Tabs */
|
|
|
|
#mw-head {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Navigation Containers */
|
|
|
|
#left-navigation {
|
|
|
|
float: left;
|
|
|
|
margin-top: @height-header;
|
|
|
|
/* When right nav would overlap left nav, it's placed below it
|
|
|
|
(normal CSS floats behavior). This rule ensures that no empty space
|
|
|
|
is shown between them due to right nav's margin-top. Page layout
|
|
|
|
is still broken, but at least the nav overlaps only the page title
|
|
|
|
instead of half the content. */
|
|
|
|
margin-bottom: -@height-header;
|
|
|
|
}
|
|
|
|
|
|
|
|
#right-navigation {
|
|
|
|
float: right;
|
|
|
|
margin-top: @height-header;
|
|
|
|
}
|
|
|
|
|
2020-04-16 18:40:39 +00:00
|
|
|
#p-personal {
|
|
|
|
position: absolute;
|
|
|
|
top: @top-personal-tools;
|
|
|
|
right: 0.75em;
|
|
|
|
z-index: @z-index-personal;
|
|
|
|
|
|
|
|
ul {
|
|
|
|
// Keep from spilling out into the first column
|
|
|
|
// For completeness this should also include the width of the logo.
|
|
|
|
// As a result it is possible for the personal tools to overlap the logo.
|
|
|
|
padding-left: @width-grid-column-one;
|
|
|
|
}
|
|
|
|
|
|
|
|
li {
|
2020-05-25 22:43:27 +00:00
|
|
|
display: inline-block;
|
2020-04-16 18:40:39 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-28 01:44:16 +00:00
|
|
|
#mw-panel {
|
|
|
|
position: absolute;
|
2020-06-23 16:21:25 +00:00
|
|
|
// The sidebar is absolutely positioned inside the header which applies a top
|
|
|
|
// margin so we need to subtract this top margin in order to get the correct
|
|
|
|
// sidebar position.
|
|
|
|
top: @height-header - @margin-top-header;
|
2020-04-28 01:44:16 +00:00
|
|
|
left: 0;
|
[modern] A new version of Vector with a new logo
Changes to support feature:
* ResourceLoaderSkinModule logo features are dropped
* New layout provided given the fork in layout between legacy and new.
* Legacy sidebar styles now pulled out
* breakpoint styles are not carried over from legacy Vector
The new Vector layout for now has one breakpoint.
Changes to storybook:
* The storybook script now pulls down image assets so that the logos can
be shown in storybook. The script is adjusted to make use of a static folder to
serve these images.
Note:
* The legacy mode is not touched as part of this patchset.
* The personal menu is unaffected by this patch and is out of scope.
* The alignment issue is noted, but will be solved at a later date.
* Changes to portal are out of scope.
* Adding storybook for modern descoped, given its not possible to load
both legacy layout and modern layout inside a storybook at current time.
Sample config:
$wgLogos = [
'icon' => 'https://di-logo-sandbox.firebaseapp.com/img/globe.png',
'tagline' => [
'src' => 'https://di-logo-sandbox.firebaseapp.com/img/tagline/en-tagline-117-13.svg',
'width' => 117,
'height' => 13,
],
'1x' => 'https://en.wikipedia.org/static/images/project-logos/enwiki.png',
'wordmark' => [
'src' => 'https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en.svg',
'width' => 116,
'height' => 18,
],
];
Coauthor: Aron Manning
Bug: T246170
Change-Id: Ibc4b055150761388a6b78f9127da342c451ce0e7
2020-03-09 05:51:00 +00:00
|
|
|
width: @width-grid-column-one;
|
|
|
|
.box-sizing( border-box );
|
|
|
|
margin-top: @margin-top-sidebar;
|
|
|
|
padding-left: @padding-left-sidebar;
|
|
|
|
z-index: @z-index-sidebar;
|
|
|
|
}
|
|
|
|
|
2020-04-28 01:44:16 +00:00
|
|
|
.mw-footer {
|
|
|
|
margin-top: 0;
|
|
|
|
}
|