mediawiki-skins-Citizen/resources/skins.citizen.styles/common/common.less

263 lines
3.8 KiB
Plaintext
Raw Normal View History

2019-08-15 17:40:13 +00:00
/*
* Framework
*/
html {
scroll-padding-top: ~'calc( var( --height-header ) + 20px )'; // fixed header offset, supported by major browsers
2019-08-15 17:40:13 +00:00
}
html,
body {
2020-02-06 19:44:22 +00:00
min-height: 100%;
padding: 0;
margin: 0;
accent-color: var( --color-primary );
background: var( --color-surface-0 );
color: var( --color-base );
2019-08-15 17:40:13 +00:00
}
:focus {
outline-color: var( --color-primary );
}
h1,
h2,
h3,
h4,
h5,
h6 {
color: var( --color-base--emphasized );
}
2019-08-15 17:40:13 +00:00
table {
2020-02-06 19:44:22 +00:00
overflow: auto;
max-width: 100vw;
2019-08-15 17:40:13 +00:00
}
hr {
2021-04-28 14:29:26 +00:00
border: 0;
border-top: 1px solid var( --border-color-base--darker );
2019-08-15 17:40:13 +00:00
}
ul,
ol {
2020-02-06 19:44:22 +00:00
padding: 0;
2019-08-15 17:40:13 +00:00
}
p,
2019-12-10 18:38:02 +00:00
ul,
ol,
2019-12-04 03:51:50 +00:00
dl {
2020-02-06 19:44:22 +00:00
margin: @content-margin-top 0 0 0;
2019-08-15 17:40:13 +00:00
}
pre,
code,
.mw-code {
border: 1px solid var( --border-color-base );
background-color: var( --color-surface-2 );
2019-08-15 17:40:13 +00:00
}
code {
2020-02-06 19:44:22 +00:00
padding: 1px 4px;
2019-08-15 17:40:13 +00:00
}
pre,
.mw-code {
2020-02-06 19:44:22 +00:00
padding: 1rem;
border-radius: var( --border-radius--large );
2020-02-06 19:44:22 +00:00
/* Wrap lines in overflow. T2260, T103780 */
white-space: pre-wrap;
2021-03-06 01:27:42 +00:00
word-break: break-word;
2019-08-15 17:40:13 +00:00
}
input,
select,
textarea {
2021-07-27 19:58:55 +00:00
border: 1px solid var( --border-color-base );
background-color: var( --color-surface-1 );
color: inherit;
}
2019-12-10 20:32:34 +00:00
fieldset {
padding: @content-margin-top / 2 20px;
2021-01-15 00:09:15 +00:00
border: 1px solid var( --border-color-base );
2020-02-06 19:44:22 +00:00
margin: @content-margin-top 0;
2019-12-10 20:32:34 +00:00
}
2020-02-06 19:44:22 +00:00
fieldset > table {
margin-top: 0 !important;
2019-12-10 20:32:34 +00:00
}
legend {
2020-02-06 19:44:22 +00:00
padding: 4px;
margin: 0;
color: var( --color-base--subtle );
2019-12-10 20:32:34 +00:00
}
2019-08-15 17:40:13 +00:00
textarea {
2020-02-06 19:44:22 +00:00
width: 100%;
}
blockquote {
2021-02-21 05:43:39 +00:00
margin: @content-margin-top var( --padding-page );
color: var( --color-base--subtle );
2020-02-06 19:44:22 +00:00
cite {
display: block;
margin-top: @content-margin-top * @content-scaling;
&:before {
2020-02-06 19:56:27 +00:00
content: '— ';
}
2020-02-06 19:44:22 +00:00
}
2019-08-15 17:40:13 +00:00
}
2021-06-10 23:26:05 +00:00
sup,
sub {
line-height: 1;
}
2019-11-19 00:43:44 +00:00
dd {
2020-02-06 19:44:22 +00:00
margin-bottom: 0.1rem;
margin-left: @content-margin-top * 2;
2019-11-19 00:43:44 +00:00
}
2019-08-15 17:40:13 +00:00
td {
2020-02-06 19:44:22 +00:00
> p,
> ul,
> ol {
&:first-child {
margin-top: 0; // Remove margin for the first element in td
}
}
2019-08-15 17:40:13 +00:00
}
a {
color: var( --color-link );
text-decoration: none;
2020-02-06 19:44:22 +00:00
&:not( [ href ] ) {
cursor: pointer;
/* Always cursor:pointer even without href */
}
&:hover {
color: var( --color-link--hover );
}
&:active {
color: var( --color-link--active );
2020-02-06 19:44:22 +00:00
}
&.new {
color: var( --color-link-new ); // Override visited
2020-02-06 19:44:22 +00:00
&:hover {
color: var( --color-link-new--hover );
}
&:active {
color: var( --color-link-new--active );
2020-02-06 19:44:22 +00:00
}
}
&.mw-selflink {
color: inherit;
font-weight: bold;
text-decoration: inherit;
&:hover {
cursor: inherit;
text-decoration: inherit;
}
2020-06-11 01:41:05 +00:00
&:active {
2020-02-06 19:44:22 +00:00
color: inherit;
}
}
2019-08-15 17:40:13 +00:00
}
.error {
2020-02-06 19:44:22 +00:00
padding: 2px 4px;
background-color: var( --background-color-destructive );
2019-08-15 17:40:13 +00:00
}
2019-12-11 05:53:49 +00:00
.nowrap {
2020-02-06 19:44:22 +00:00
white-space: nowrap;
2019-12-11 05:53:49 +00:00
}
2019-08-15 17:40:13 +00:00
/*
* Content
*/
.mw-body,
.parsoid-body {
2020-02-06 19:44:22 +00:00
direction: ltr;
2019-08-15 17:40:13 +00:00
}
// TODO: Think of better places to put indicators;
2020-06-12 17:44:24 +00:00
.mw-indicators {
2021-01-26 20:38:27 +00:00
padding-left: 10px;
border-left: 1px solid var( --border-color-base );
margin-left: 10px;
font-size: @ui-menu-text;
2020-06-12 17:44:24 +00:00
}
2020-02-06 19:44:22 +00:00
.printfooter {
display: none;
}
div.patrollink {
font-size: 75%;
text-align: right;
}
2021-03-13 17:57:59 +00:00
video {
max-width: 100%; // Prevent overflow
}
.skin-citizen-dark {
color-scheme: dark;
.mw-editsection > a:before {
filter: invert( 1 );
}
2021-01-26 20:38:27 +00:00
.mw-indicator {
filter: invert( 1 ) hue-rotate( 180deg );
// Have to hardcode the color since the filter breaks the color
a {
color: @color-primary;
&:hover {
color: @color-primary--hover;
}
&:active {
color: @color-primary--active;
}
}
2021-01-26 20:38:27 +00:00
}
}
@media ( max-width: @width-breakpoint-tablet ) {
.mw-body,
.parsoid-body {
overflow-x: hidden; // fallback if clip is not supported
overflow-x: clip; // avoid breaking layout in smaller screen sizes
}
table {
display: block;
}
}
@media ( min-width: @width-breakpoint-tablet ) {
// Delay scroll animation won't happen on load
// Use it only for larger viewport as it is very costly
// on mobile devices
html.citizen-animations-ready {
scroll-behavior: smooth;
}
}