2020-02-28 20:06:33 +00:00
|
|
|
@import '../../variables.less';
|
2020-03-30 20:07:35 +00:00
|
|
|
@import 'mediawiki.mixins.less';
|
|
|
|
@import './layout.less';
|
2020-05-15 00:58:21 +00:00
|
|
|
@import 'legacy/Sidebar.less';
|
2020-03-30 20:07:35 +00:00
|
|
|
@import 'checkboxHack.less';
|
2020-05-26 17:38:24 +00:00
|
|
|
|
|
|
|
.mw-sidebar-action {
|
|
|
|
// Align with the portal heading/links
|
|
|
|
// `.portal` + `.portal .body`
|
|
|
|
margin: 8px @margin-end-portal 8px @margin-start-portal + @margin-start-portal-body;
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-sidebar-action-link {
|
|
|
|
font-size: @font-size-portal-list-item;
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
2020-03-30 20:07:35 +00:00
|
|
|
|
|
|
|
// FIXME please add a class, .mw-navigation, and use that instead of this identifier.
|
|
|
|
#mw-navigation {
|
|
|
|
.mw-checkbox-hack-checkbox,
|
|
|
|
.mw-checkbox-hack-button {
|
|
|
|
// The icon is only 44px tall but the header is 50px. Offset by the difference from the logo
|
|
|
|
// icon and center with respect to the header.
|
2020-05-28 03:18:56 +00:00
|
|
|
top: @margin-top-header + ( ( @height-logo-icon - @size-sidebar-button ) / 2 );
|
|
|
|
// FIXME: Replace by proper calculation and variable.
|
|
|
|
left: 14px;
|
2020-03-30 20:07:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mw-checkbox-hack-button {
|
|
|
|
position: absolute;
|
|
|
|
z-index: @z-index-sidebar-button;
|
|
|
|
// Override minimum dimensions set by mw-ui-icon.mw-ui-icon-element.
|
|
|
|
min-width: @size-sidebar-button;
|
|
|
|
min-height: @size-sidebar-button;
|
|
|
|
width: @size-sidebar-button;
|
|
|
|
height: @size-sidebar-button;
|
|
|
|
border: 1px solid transparent;
|
|
|
|
border-radius: @border-radius-base;
|
2020-05-29 21:52:36 +00:00
|
|
|
.transition( background-color @transition-duration-base, border-color @transition-duration-base, box-shadow @transition-duration-base, opacity @transition-duration-base; );
|
2020-03-30 20:07:35 +00:00
|
|
|
|
|
|
|
&:before {
|
|
|
|
// FIXME: the icon itself is supposed to be 20px. mediawiki.ui uses 24px.
|
|
|
|
// As soon as mediawiki.ui is standardized, remove this override. See T191021.
|
2020-05-29 17:59:40 +00:00
|
|
|
min-width: 20px;
|
2020-03-30 20:07:35 +00:00
|
|
|
min-height: 20px;
|
2020-05-29 17:59:40 +00:00
|
|
|
height: 100%;
|
|
|
|
// Center it horizontally.
|
|
|
|
margin: 0 12px;
|
2020-05-29 21:52:36 +00:00
|
|
|
// Equals `#555`, closest to `#54595d` on background-color `#fff`.
|
|
|
|
opacity: 0.67;
|
2020-03-30 20:07:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: @background-color-frameless--hover;
|
|
|
|
|
2020-05-29 21:52:36 +00:00
|
|
|
&:before {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
2020-03-30 20:07:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.mw-checkbox-hack-checkbox:focus ~ .mw-checkbox-hack-button {
|
|
|
|
// Next two rules from OOUI, frameless, icon-only button widget.
|
|
|
|
border-color: @color-primary;
|
|
|
|
.box-shadow( inset 0 0 0 1px @color-primary );
|
|
|
|
}
|
|
|
|
|
|
|
|
// Use the MediaWiki checkbox hack class from checkboxHack.less. This class exists on the
|
|
|
|
// checkbox input for the menu panel.
|
|
|
|
.mw-checkbox-hack-checkbox:not( :checked ) ~ .mw-sidebar {
|
|
|
|
// Turn off presentation so that screen readers get the same effect as visually hiding.
|
|
|
|
// Visibility and opacity can be animated. If animation is unnecessary, use `display: none`
|
|
|
|
// instead to avoid hidden rendering.
|
|
|
|
visibility: hidden;
|
|
|
|
opacity: 0;
|
|
|
|
.transform( translateX( -100% ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.mw-sidebar {
|
|
|
|
// Enable animations on desktop width only.
|
|
|
|
@media ( min-width: @width-breakpoint-desktop ) {
|
|
|
|
@timing: @transition-duration-base ease-out;
|
|
|
|
.transition( transform @timing, opacity @timing, visibility @timing; );
|
|
|
|
}
|
|
|
|
}
|