mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-24 15:53:46 +00:00
Merge "Align mw.notify()
alerts to avoid overlapping sticky header"
This commit is contained in:
commit
662fa2a013
|
@ -121,6 +121,13 @@
|
|||
// language button
|
||||
@height-lang-button: unit( 32 / @font-size-browser, em );
|
||||
|
||||
// T296321 For sticky header, set an explicit height. This is needed for scroll padding
|
||||
// and for other sticky elements on the page. Setting the height in relative units enables
|
||||
// the header's height to adapt to the browser's font size setting. Because
|
||||
// this variable is used to determine top offsets for sticky elements where the
|
||||
// font-size might not be 16px, using rem avoids the cascading effects of em units.
|
||||
@height-sticky-header: unit( 50px / @font-size-browser, rem );
|
||||
|
||||
// Z-indices
|
||||
// See skinStyles/jquery.ui/jquery.ui.datepicker.css.
|
||||
// @z-index-ui-datepicker-cover: -1;
|
||||
|
@ -150,6 +157,8 @@
|
|||
|
||||
// Transitions
|
||||
@transition-duration-base: 100ms;
|
||||
// Sticky header hide/show transition
|
||||
@transition-sticky-header: transform 250ms linear;
|
||||
|
||||
//
|
||||
// Layout
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
@import '../../common/variables.less';
|
||||
@import 'mediawiki.mixins.less';
|
||||
|
||||
// T296321 Set an explicit height. This is needed for scroll padding and for other
|
||||
// sticky elements on the page. Setting the height in relative units enables
|
||||
// the header's height to adapt to the browser's font size setting. Because
|
||||
// this variable is used to determine top offsets for sticky elements where the
|
||||
// font-size might not be 16px, using rem avoids the cascading effects of em units.
|
||||
@height-sticky-header: unit( 50px / @font-size-browser, rem );
|
||||
|
||||
.vector-sticky-header {
|
||||
width: 100%;
|
||||
height: @height-sticky-header;
|
||||
|
@ -17,7 +10,7 @@
|
|||
right: 0;
|
||||
z-index: @z-index-header;
|
||||
transform: translateY( -100% );
|
||||
transition: transform 250ms linear;
|
||||
transition: @transition-sticky-header;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
max-width: @max-width-page-container + @padding-horizontal-page-container + @padding-horizontal-page-container;
|
||||
|
|
|
@ -16,3 +16,22 @@
|
|||
border-radius: @border-radius-base;
|
||||
box-shadow: 0 2px 2px 0 rgba( 0, 0, 0, 0.25 );
|
||||
}
|
||||
|
||||
/**
|
||||
* With the sticky header enabled in modern Vector,
|
||||
* We lower the z-index to make the user menu and language picker
|
||||
* useable when a notification is present.
|
||||
*/
|
||||
.vector-sticky-header-enabled .mw-notification-area {
|
||||
transition: @transition-sticky-header;
|
||||
z-index: @z-index-menu;
|
||||
}
|
||||
|
||||
/**
|
||||
* When the sticky header is open in modern Vector,
|
||||
* and the notification bar is also open, the notification
|
||||
* should be moved so that it doesn't obstruct the sticky header
|
||||
*/
|
||||
.vector-sticky-header-visible ~ .mw-notification-area-overlay > .mw-notification-area-floating {
|
||||
transform: translateY( @height-sticky-header );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue