mediawiki-skins-Citizen/skinStyles/mediawiki/mediawiki.diff.styles.less
alistair3149 923ddedcc0
fix(menu): 🐛 avoid double view button on talk page
In 9969479, we forced the view button to be visible to allow the return action (#845).
There are no good ways to target revision page only so we rely on the diff styles.
However, Extension:DiscussionTools inline the said styles on talk page while talk page also has
a return action registered under the associated page menu. This leaves two button serving the
same function.
2024-06-24 14:19:34 -04:00

75 lines
1.4 KiB
Plaintext

/*
* Citizen - Diff Styles
* https://starcitizen.tools
*/
@import '../../resources/variables.less';
.diff {
display: table; // So that it does not break layout in mobile
&change {
color: var( --color-base--emphasized );
}
&-lineno {
font-size: var( --font-size-small );
font-weight: var( --font-weight-normal );
letter-spacing: 0.05em;
}
&-context {
color: var( --color-base--subtle );
background: transparent;
border-color: var( --border-color-base );
}
&-addedline {
border-color: var( --color-success );
.diffchange {
background: var( --background-color-success );
}
}
&-deletedline {
border-color: var( --color-destructive );
.diffchange {
background: var( --background-color-destructive );
}
}
&-addedline,
&-deletedline,
&-context {
font-size: var( --font-size-x-small ); // relative font size
}
&-editfont-monospace {
.diff {
&-addedline,
&-deletedline,
&-context {
font-family: var( --font-family-monospace );
}
}
}
}
.mw-diff-movedpara-left::after,
.mw-diff-movedpara-right::after {
color: var( --color-base--subtle );
}
// HACK: Restore view button on revision page
// There are no good way to target revision page
// The :not selector is needed because Extension:DiscussionTools loads the diff styles inline
body:not(.ns-talk) .action-view #ca-view {
position: relative !important;
width: auto;
height: auto;
margin: 0;
clip: unset;
}