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

478 lines
6.8 KiB
Plaintext
Raw Normal View History

2019-08-15 17:40:13 +00:00
/*
* Framework
*/
html {
2020-02-06 19:44:22 +00:00
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
2019-08-15 17:40:13 +00:00
}
html,
body {
2020-02-06 19:44:22 +00:00
min-height: 100%;
overflow-x: hidden; // prevent overflow from scrollbar
2020-02-06 19:44:22 +00:00
margin: 0;
padding: 0;
background: @base-100;
color: @color-content-text;
2019-08-15 17:40:13 +00:00
}
table {
display: block;
2020-02-06 19:44:22 +00:00
max-width: 100vw;
overflow: auto;
2019-08-15 17:40:13 +00:00
}
hr {
2020-02-06 19:44:22 +00:00
display: none;
2019-08-15 17:40:13 +00:00
}
ul {
2020-02-06 19:44:22 +00:00
list-style-type: square;
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 {
2020-02-06 19:44:22 +00:00
color: @base-0;
background-color: @base-90;
border: 1px solid @base-80;
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;
/* Wrap lines in overflow. T2260, T103780 */
white-space: pre-wrap;
2019-08-15 17:40:13 +00:00
}
2019-12-10 20:32:34 +00:00
fieldset {
2020-02-06 19:44:22 +00:00
border: 1px solid @base-80;
color: @base-30;
margin: @content-margin-top 0;
padding: @content-margin-top / 2 @margin-side;
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
color: @base-20;
margin: 0;
padding: 4px;
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 {
2020-02-06 20:04:09 +00:00
margin: @content-margin-top * 2 * @content-scaling;
2020-02-06 19:44:22 +00:00
padding: 0 @content-margin-top * 4 * @content-scaling;
color: @base-30;
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
}
2019-11-19 00:43:44 +00:00
dd {
2020-02-06 19:44:22 +00:00
margin-left: @content-margin-top * 2;
margin-bottom: 0.1rem;
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 {
2020-02-06 19:44:22 +00:00
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;
}
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: @red-90;
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
margin-top: @header-height + @margin-side;
padding: 0 @margin-side;
min-height: 80vh; // avoid footer being in the middle of the page
direction: ltr;
2019-08-15 17:40:13 +00:00
}
.mw-wiki-title {
2020-02-06 19:44:22 +00:00
a& {
color: @base-50;
transition: @transition-opacity;
&:hover,
&:active,
&:focus {
color: @base-30;
text-decoration: none;
}
}
2019-08-15 17:40:13 +00:00
}
2020-06-11 22:15:40 +00:00
figcaption,
.thumbcaption {
margin: @content-margin-top / 2 0 0;
color: @base-30;
}
2020-02-06 19:44:22 +00:00
.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;
}
}
}
}
2020-06-12 17:44:24 +00:00
.firstHeading {
margin: 0;
color: @base-10;
overflow-wrap: break-word; // Break word instead of overflow if title is too long
}
2020-02-06 19:44:22 +00:00
2020-06-12 17:44:24 +00:00
#siteSub {
display: block;
margin: 0.4rem 0 1.6rem;
color: @base-30;
}
2020-02-06 19:44:22 +00:00
2020-06-12 17:44:24 +00:00
.mw-indicators {
float: right;
line-height: @content-line-height;
/* Ensure that this is displayed on top of .mw-body-content and clickable */
position: relative;
z-index: 1;
}
2020-02-06 19:44:22 +00:00
2020-06-12 17:44:24 +00:00
.mw-indicator {
display: inline-block;
zoom: 1;
*display: inline; // stylelint-disable declaration-block-no-duplicate-properties
}
2020-02-06 19:44:22 +00:00
2020-06-12 17:44:24 +00:00
.firstHeading,
#siteSub {
.content-center;
2019-08-15 17:40:13 +00:00
}
2020-06-11 22:15:40 +00:00
#contentSub,
#contentSub2 {
color: @base-30;
}
2019-08-15 17:40:13 +00:00
.mw-body-content {
2020-02-06 19:44:22 +00:00
position: relative;
.content-center;
z-index: 0;
p {
overflow-wrap: break-word;
}
table {
margin: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 0;
padding: 0;
color: @color-content-header;
}
h1,
h2 {
margin-top: @content-margin-top * 3;
}
h3,
h4,
h5,
h6,
p + p {
margin-top: @content-margin-top * 2;
}
h1 + h2,
h2 + h3,
h3 + h4,
h4 + h5,
h5 + h6,
p,
table {
margin-top: @content-margin-top;
}
ul {
margin: @content-margin-top 0 0 @content-margin-top * 2;
ul {
margin: 0 0 0 @content-margin-top * 2;
}
}
ol {
margin: @content-margin-top 0 0 @content-margin-top * 3;
ol {
margin: 0 0 0 @content-margin-top * 3;
}
}
img {
vertical-align: middle;
}
a.image {
display: block;
overflow: hidden;
width: fit-content; // Get rid of extra pixels from thumbinner
2020-02-06 19:44:22 +00:00
img {
filter: none;
transition: @transition-filter, @transition-transform-quick;
2020-02-06 19:44:22 +00:00
&.lazy {
display: block;
background-color: @base-90;
filter: blur( 8px );
overflow: hidden;
2020-02-06 19:44:22 +00:00
}
}
}
}
2020-02-06 19:44:22 +00:00
#mw-content-text {
.mw-parser-output {
.mw-headline {
order: -1; // Make sure that header is the first
}
2020-02-06 19:44:22 +00:00
& > h1,
& > h2,
& > h3,
& > h4,
& > h5,
& > h6 {
display: flex;
align-items: center;
justify-content: space-between;
}
2020-02-06 19:44:22 +00:00
.mw-editsection {
position: absolute;
display: flex;
margin: 0;
left: 0;
transform: ~'translateX(calc(-100% - @{margin-side}))';
2020-02-06 19:44:22 +00:00
a {
.resource-loader-icon-link-small;
padding: @margin-side / 4;
opacity: @opacity-icon;
transition: @transition-opacity;
text-indent: -9999px; // Hide text
background: 0 !important; // Cancel above styles
2020-02-06 19:44:22 +00:00
&:before {
.resource-loader-icon;
background-size: contain;
display: block;
2020-02-06 19:44:22 +00:00
}
&:hover,
&:active,
&:focus {
opacity: @opacity-icon-active;
2020-02-06 19:44:22 +00:00
}
}
> span {
display: none;
2020-02-06 19:44:22 +00:00
}
}
}
2019-08-15 17:40:13 +00:00
}
2019-08-17 03:59:04 +00:00
.plainlist ol,
.plainlist ul {
2020-02-06 19:44:22 +00:00
line-height: inherit;
list-style: none none;
margin: 0;
2019-08-17 01:48:16 +00:00
}
2020-06-10 05:17:49 +00:00
@media ( max-width: @screen2 ) {
2020-02-06 19:44:22 +00:00
.mw-editsection {
position: relative !important;
transform: none !important;
}
2019-08-19 04:33:07 +00:00
}
2020-06-12 18:05:21 +00:00
@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-body .firstHeading,
.mw-body-content h1,
.mw-body-content h2,
.mw-body-content h3,
.mw-body-content h4,
.mw-body-content h5,
.mw-body-content h6 {
color: @dark-text-100;
}
.mw-body-content #contentSub,
.mw-body-content #contentSub2,
.mw-body #siteSub {
color: @dark-text-80 !important;
}
.mw-editsection > a:before {
filter: invert( 1 );
}
}