mediawiki-skins-MinervaNeue/skinStyles/mediawiki.action.history.styles.less

242 lines
5.2 KiB
Plaintext
Raw Normal View History

/* stylelint-disable selector-max-id, no-descending-specificity */
@import 'mediawiki.skin.variables';
@import 'mediawiki.mixins.less';
@import '../minerva.less/minerva.variables.less';
@import '../minerva.less/minerva.mixins.less';
/* Simplify default version */
.mw-mf-amc-disabled {
/** compare feature not available, T353401 */
#mw-history-compare input,
.mw-history-compareselectedversions,
/* Header shows date, so this is superfluous. */
&.action-history .mw-changeslist-date,
/* current link is hidden as previous link spans entire row. */
.mw-history-histlinks-current,
/* tools are hidden for historic reasons. Feel free to reconsider. */
&.action-history .mw-tag-markers,
/* tools are hidden for historic reasons. Feel free to reconsider. */
.mw-usertoollinks,
/* Hidden for historic reasons. Feel free to reconsider. */
.mw-history-revisionactions,
/* tools are hidden for historic reasons. Feel free to reconsider. */
.mw-pager-tools {
display: none;
}
.mw-changeslist-time {
display: block !important;
}
.mw-history-histlinks span {
&::before,
&::after {
content: none !important;
}
}
&.action-history #pagehistory li {
.history-user a {
color: @color-subtle;
bdi {
word-break: break-word;
}
}
}
.mw-history-histlinks-previous {
.changeslist-make-row-linkable();
}
}
.action-history {
#mw-content-text > form {
margin: 0;
}
// the margin value used to create a "faux" column after the
// radio buttons.
@revision-selectors-width: 50px;
// form element wrapping history page content. Overrides #mw-content-text > form
// for tablet widths.
#mw-history-compare {
width: 100%;
max-width: 100%;
}
// The large "Compare selected revisions" button container
.mw-history-compareselectedversions {
background: @background-color-base;
// "Compare selected revisions" button
.mw-history-compareselectedversions-button {
width: 100%;
max-width: 100%;
-webkit-appearance: unset;
font-weight: bold;
border-radius: @border-radius-base;
margin: 10px 0;
}
.mw-history-revisionactions {
margin-bottom: 2%;
white-space: pre-wrap;
}
// Admin specific "change visibility of selected revisions" buttons.
.mw-checkbox-toggle-controls {
display: none;
}
// Second large "Compare selected revisions" button container at bottom of page
& ~ .mw-history-compareselectedversions {
// hide second "Compare selected revisions" button near bottom
.mw-history-compareselectedversions-button {
display: none;
}
// show second "Change visibility of selected revisions" button near bottom
.mw-history-revisionactions,
.mw-checkbox-toggle-controls {
display: block;
}
}
}
// for the first "compare revisions" (should be above content)
form > .mw-history-compareselectedversions:first-of-type {
top: 0;
z-index: @z-index-above-content;
.position-sticky();
}
.mw-thanks-thank-link {
margin-right: 1em;
}
.jquery-confirmable-text {
display: flex;
align-items: center;
padding-right: 8px;
}
// "Change visibility of selected revisions" button (for admins only)
.mw-history-revisiondelete-button {
background-color: @background-color-interactive-subtle;
margin-bottom: 1em;
}
#pagehistory {
margin-bottom: 24px;
Feature flag overhaul Two new feature flags: 1) MinervaPersonalMenu 2) MinervaAdvancedMainMenu Changes: * AMC defaults to false on desktop - desktop doesn't have AMC mode it just enables several skin options. * WHen inserting a link at the bottom of the page check whether the talk at top of the page (tabs) is enabled.. not AMC * Update ServiceWiring to construct menu based on MinervaAdvancedMainMenu and MinervaPersonalMenu - note when former is enabled but not latter there is no way to logout. Noted in README. * Use one entry point for skins.minerva.amc.styles/index.less * Document files inside skins.minerva.amc.styles to make it clear which features they are associated with * Drop history page styles when AMC is disabled - it's not possible to ever get to these as the history page redirects in non-AMC mode * Rename the class .minerva--amc-enabled to minerva--history-page-action-enabled to reflect its real purpose and move styles from skins.minerva.base.styles to skins.minerva.amc.styles No need to worry about cached HTML as AMC runs without cache... * Remove isAnyAMCOptionEnabled - it's an antipattern and should be discouraged as it discourages the art of feature flagging. Nothing is using it after these changes. * The AMC_MODE flag is disabled. There is no need for this - AMC is not a feature and therefore not a skin option. It is a mechanism for turning on other skin options. Tests are updated. Testing: It should now be possible to enable any feature in `beta` and see it in the beta of the site. Bug: T229295 Change-Id: I48959905f5c09721b14a27aa1a5ad82849ac6263
2019-08-22 20:31:31 +00:00
padding: 0;
li {
Feature flag overhaul Two new feature flags: 1) MinervaPersonalMenu 2) MinervaAdvancedMainMenu Changes: * AMC defaults to false on desktop - desktop doesn't have AMC mode it just enables several skin options. * WHen inserting a link at the bottom of the page check whether the talk at top of the page (tabs) is enabled.. not AMC * Update ServiceWiring to construct menu based on MinervaAdvancedMainMenu and MinervaPersonalMenu - note when former is enabled but not latter there is no way to logout. Noted in README. * Use one entry point for skins.minerva.amc.styles/index.less * Document files inside skins.minerva.amc.styles to make it clear which features they are associated with * Drop history page styles when AMC is disabled - it's not possible to ever get to these as the history page redirects in non-AMC mode * Rename the class .minerva--amc-enabled to minerva--history-page-action-enabled to reflect its real purpose and move styles from skins.minerva.base.styles to skins.minerva.amc.styles No need to worry about cached HTML as AMC runs without cache... * Remove isAnyAMCOptionEnabled - it's an antipattern and should be discouraged as it discourages the art of feature flagging. Nothing is using it after these changes. * The AMC_MODE flag is disabled. There is no need for this - AMC is not a feature and therefore not a skin option. It is a mechanism for turning on other skin options. Tests are updated. Testing: It should now be possible to enable any feature in `beta` and see it in the beta of the site. Bug: T229295 Change-Id: I48959905f5c09721b14a27aa1a5ad82849ac6263
2019-08-22 20:31:31 +00:00
.changeslist-row();
box-sizing: border-box;
position: relative;
min-height: inherit;
padding: 12px 0 10px 60px;
}
li::after {
.clearfix();
}
.mw-history-histlinks {
float: right;
}
// Diff radio buttons, admin revision-delete checkbox.
input[ type='radio' ],
input[ type='checkbox' ] {
// Align checkboxes with text.
top: 5px;
}
input[ type='radio' ] {
position: absolute;
top: 16px;
}
input[ name='oldid' ] {
left: 8px;
}
input[ name='diff' ] {
left: 32px;
}
// checkbox appears slightly smaller than radio buttons,
// moving down 6px to vertically center.
input[ type='checkbox' ] {
position: absolute;
top: 46px;
left: 32px;
}
}
.mw-diff-bytes,
.mw-changeslist-date {
display: block;
}
// removes space between the .mw-diff-bytes and comments.
.comment {
float: left;
width: 100%;
margin-bottom: 6px;
}
// hide page instructions, article size, double dot separator, thank link
.mw-history-legend,
.history-size.mw-diff-bytes,
.mw-changeslist-separator {
display: none;
}
abbr {
background: @background-color-interactive;
border-radius: 2px;
font-size: 0.9em;
font-weight: bold;
padding: 0 6px 1px;
}
// Disable the parentheseses around the undo and rollback link.
.mw-changeslist-links:not( .mw-usertoollinks ):not( .mw-history-histlinks ) {
& > span::after,
& > span::before {
content: '';
}
}
.mw-tag-markers {
// Disable the core margins of tags.
margin: 0;
// places the tags on the same line as the float-right undo button.
display: inline;
}
.history-user {
// (hack) - the history page injects unstyleable whitespace. to keep user aligned with other elements
// it most be moved to the left.
.mw-mf-amc-enabled & {
margin-left: -5px;
}
}
.mw-history-undo {
float: right;
// Push the tags down to bottom so undo and tags do not overlay.
padding-bottom: 10px;
a {
// Increase touch area of undo button.
padding: 5px 8px;
}
}
}