mediawiki-skins-Vector/resources/skins.vector.styles/components/PinnableHeader.less
bwang 62da66047f Ensure the TOC works across all pinned/unpinned cases when JS is disabled
- Also consolidates how we hide the pin/unpin buttons into a single CSS block

Bug: T331176
Change-Id: I359bde8abee48596186486d48fa6e59297094153
2023-03-13 23:48:18 +00:00

65 lines
1.5 KiB
Plaintext

.vector-pinnable-header {
.vector-feature-page-tools-enabled & {
.mixin-vector-dropdown-menu-item();
// Override display: flex applied by .mixin-vector-dropdown-menu-item()
display: block;
}
}
.vector-pinnable-header[ hidden ] {
display: none;
}
.vector-page-tools,
.vector-toc {
.vector-feature-page-tools-enabled .vector-pinned-container & .vector-pinnable-header {
// Match styles with tabs in page toolbar to ensure TOC and Page Tools pinnable headers
// align with page toolbar border
padding: @padding-vertical-tabs;
margin-bottom: -1px;
}
}
.vector-pinnable-header-label {
display: inline-block;
color: @color-base--subtle;
font-size: unit( 14 / @font-size-browser, rem );
margin: 0;
padding: 0;
border: 0;
}
// Styles for the "move to sidebar/hide" buttons, hidden by default.
.vector-pinnable-header-toggle-button {
display: none;
border: 0;
padding: 0;
background-color: transparent;
color: @color-primary;
cursor: pointer;
&:hover {
color: @color-primary--hover;
}
&:before {
content: '@{msg-brackets-start}';
color: @color-base--subtle;
}
&:after {
content: '@{msg-brackets-end}';
color: @color-base--subtle;
}
}
// Pinnable behavior is only enabled when JS is enabled and on larger viewports
@media ( min-width: @min-width-desktop ) {
.client-js {
.vector-pinnable-header-unpinned .vector-pinnable-header-pin-button,
.vector-pinnable-header-pinned .vector-pinnable-header-unpin-button {
display: inline-block;
}
}
}