mediawiki-skins-Vector/resources/skins.vector.styles/components/PinnableHeader.less
Volker E b55d95c70c styles: Replace legacy Vector breakpoint tokens where applicable
Replacing the legacy Vector breakpoint tokens with the Codex
standard ones. All names have been unified, only some legacy values
remain for backwards compatibility.
Also
- replacing a wrongly applied min-width with the correct max-width
  token,
- replacing a width with an equal value min-width one and
- removing the now equal value mobile min-width one.

Note that we can't do some reference magic here alike
`@max-width-breakpoint-mobile: @min-width-breakpoint-tablet - 1px;` as
this would take the Codex value from skin variables and not the legacy
value.
Also note, that we could move all those Vector legacy definitions into
Vector's 'mediawiki.skin.variables.less' file(s), but that would mean
that extensions don't rely on the Codex default values, but on Vector's
and we want latter to move to the standard, also in foresight of
further standardization to build for all feature teams like a
shared Grid.

Bug: T331403
Change-Id: Ifb968b1977001edb1a79e20df387c61f27043542
2023-10-25 22:03:46 +00:00

59 lines
1.4 KiB
Plaintext

.vector-pinnable-header {
.mixin-vector-dropdown-menu-item();
// Override display: flex applied by .mixin-vector-dropdown-menu-item()
display: block;
}
.vector-pinned-container .vector-page-tools .vector-pinnable-header,
.vector-pinned-container .vector-toc .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-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-progressive;
cursor: pointer;
text-align: left;
font-size: unit( @font-size-small, rem );
&:hover {
color: @color-progressive--hover;
}
&::before {
content: '@{msg-brackets-start}';
color: @color-subtle;
}
&::after {
content: '@{msg-brackets-end}';
color: @color-subtle;
}
}
// Pinnable behavior is only enabled when JS is enabled and on larger viewports
@media ( min-width: @min-width-breakpoint-desktop ) {
&.client-js {
.vector-pinnable-header-unpinned .vector-pinnable-header-pin-button,
.vector-pinnable-header-pinned .vector-pinnable-header-unpin-button {
display: inline-block;
}
}
}