mediawiki-skins-MinervaNeue/resources/skins.minerva.base.styles/content/text.less
Steph Toyofuku 6f98cc6460 (Almost) no more CSS variables in minerva
Remove direct usage of CSS variables in Minerva, and replace them with
codex design tokens again.  Document this decision in the original ADR

Note: there are still a small number of CSS variables in use, including
most notably the --color-link-red fix, which broke when I removed it,
but this change takes care of all the ones that could be easily replaced

Bug: T363743
Change-Id: I7d3a9dceb908167078987de1733774c8bd4bea2f
2024-06-11 11:44:47 -07:00

105 lines
1.6 KiB
Plaintext

@import 'mediawiki.mixins.less';
@import '../../../minerva.less/minerva.variables.less';
@import '../../../minerva.less/minerva.mixins.less';
.content {
p {
padding-bottom: 0.5em;
margin: 0.5em 0 0 0;
}
hr {
// border-color used as background-color as exception here.
background-color: @border-color-base;
height: 1px;
border: 0;
}
// Code
//
// Use this solely for blocks of computer code.
//
// Markup:
// <code>
// body {
// color:red;
// }
// </code>
// Preformatted text
//
// Use on text where whitespace is significant and the content should not be formatted.
//
// Markup:
// <pre>
// body {
// color:red;
// }
// </pre>
//
// Note .mw-code is not added here as it is assumed that will be used with a suitable tag
kbd,
samp,
code,
pre {
font-family: @font-family-monospace;
border: @border-subtle;
white-space: pre-wrap;
}
code {
padding: 0.2em 0.5em;
}
pre {
padding: 1em;
}
}
b,
strong {
font-weight: bold;
}
blockquote {
border-left: 3px @border-style-base @border-color-subtle;
padding: @padding-vertical-blockquote @padding-end-blockquote @padding-vertical-blockquote @padding-start-blockquote;
font-family: @font-family-serif;
font-size: 1.1em;
// Ensure not to inherit whitespace mashing margins on child elements.
> :first-child {
margin-top: 0;
}
> :last-child {
margin-bottom: 0;
}
> :only-child {
margin-top: 0;
margin-bottom: 0;
}
}
em,
i {
font-style: italic;
}
sup {
vertical-align: super;
}
sub {
vertical-align: sub;
}
sub,
sup,
.content .mw-ref {
font-size: 0.75em;
// Avoid line-height issues caused by sup and sub
line-height: 1;
}