mediawiki-skins-Citizen/resources/skins.citizen.styles/common/common.less
2020-06-30 16:08:24 -04:00

318 lines
4.3 KiB
Plaintext

/*
* Framework
*/
html {
scroll-padding-top: @header-height + @margin-side; // fixed header offset, supported by major browsers
scroll-behavior: smooth; // not supported by IE, Edge, Safari, and Opera, use JQuery as fallback
}
html,
body {
min-height: 100%;
overflow-x: hidden; // prevent overflow from scrollbar
margin: 0;
padding: 0;
background: @base-100;
color: @color-content-text;
}
table {
display: block;
max-width: 100vw;
overflow: auto;
}
hr {
display: none;
}
ul {
list-style-type: square;
}
input {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
}
ul,
ol {
padding: 0;
}
p,
ul,
ol,
dl {
margin: @content-margin-top 0 0 0;
}
pre,
code,
.mw-code {
color: @base-0;
background-color: @base-90;
}
code {
padding: 1px 4px;
}
pre,
.mw-code {
padding: 1rem;
/* Wrap lines in overflow. T2260, T103780 */
white-space: pre-wrap;
}
fieldset {
color: @base-30;
margin: @content-margin-top 0;
padding: @content-margin-top / 2 @margin-side;
}
fieldset > table {
margin-top: 0 !important;
}
legend {
color: @base-20;
margin: 0;
padding: 4px;
}
input,
pre,
code,
fieldset {
border: 1px solid @base-80;
}
textarea {
width: 100%;
}
blockquote {
margin: @content-margin-top * 2 * @content-scaling;
padding: 0 @content-margin-top * 4 * @content-scaling;
color: @base-30;
cite {
display: block;
margin-top: @content-margin-top * @content-scaling;
&:before {
content: '— ';
}
}
}
dd {
margin-left: @content-margin-top * 2;
margin-bottom: 0.1rem;
}
td {
> p,
> ul,
> ol {
&:first-child {
margin-top: 0; // Remove margin for the first element in td
}
}
}
a {
color: @color-link;
text-decoration: none !important;
&:not( [ href ] ) {
cursor: pointer;
/* Always cursor:pointer even without href */
}
&:hover {
color: @color-link-active;
}
&.new {
color: @color-link-new !important; // Override visited
&:hover {
color: @color-link-new-active !important;
}
}
&.mw-selflink {
color: inherit;
font-weight: bold;
text-decoration: inherit;
&:hover {
cursor: inherit;
text-decoration: inherit;
}
&:active {
color: inherit;
}
}
}
.error {
padding: 2px 4px;
background-color: @red-90;
}
.nowrap {
white-space: nowrap;
}
/*
* Content
*/
.mw-body,
.parsoid-body {
margin-top: @header-height + @margin-side;
padding: 0 @margin-side;
min-height: 80vh; // avoid footer being in the middle of the page
direction: ltr;
}
.mw-body-content {
.plainlist ol,
.plainlist ul {
line-height: inherit;
list-style: none none;
margin: 0;
}
}
.mw-wiki-title {
a& {
color: @base-50;
transition: @transition-opacity;
&:hover,
&:active,
&:focus {
color: @base-30;
text-decoration: none;
}
}
}
figcaption,
.thumbcaption {
margin: @content-margin-top / 2 0 0;
color: @base-30;
}
.thumb {
overflow: hidden;
> .thumbinner {
> a {
transition: @transition-box-shadow-quick !important;
&:hover:not( .lazy ):not( .new ) {
background: 0 !important;
.boxshadow(2);
img {
transform: scale( 1.1 );
}
}
&:before {
content: none;
}
&.new {
padding: @margin-side / 2;
display: block;
background-color: @base-80;
transition: @transition-background-quick, @transition-color-quick !important;
}
}
}
}
.mw-indicators {
float: right;
/* Ensure that this is displayed on top of .mw-body-content and clickable */
position: relative;
z-index: 1;
}
/* Wider page width for special pages */
.ns--1 {
.firstHeading,
#siteSub,
.mw-body-content {
max-width: @screen2;
}
}
@media ( max-width: @screen2 ) {
.mw-editsection {
position: relative !important;
transform: none !important;
}
}
@media ( prefers-color-scheme: dark ) {
html,
body {
background: @dark-bg-0;
color: @dark-text-90;
}
::-webkit-scrollbar-thumb {
background-color: @dark-bg-60;
}
* {
scrollbar-color: @dark-bg-60 transparent;
}
pre,
code,
.mw-code {
color: @dark-text-90;
background-color: @dark-bg-10;
border: 1px solid @dark-bg-20;
}
input,
select,
textarea {
border: 1px solid @dark-bg-50;
background: @dark-bg-40;
color: @dark-text-80;
}
fieldset {
color: @dark-text-90;
border-color: @dark-bg-20;
}
legend {
color: @dark-text-100;
}
a,
a.external {
color: @dark-color-link;
}
a.new {
color: @dark-color-link-new !important;
}
.mw-editsection > a:before {
filter: invert( 1 );
}
}