MediaWiki:Common.css
From MiWiki
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* CSS placed here will be applied to all skins */
:root {
--article-color: #000000;
--link-none: #d73333;
/*https://www.internationalphoneticassociation.org/content/ipa-fonts*/
--font-ipa: "Times New Roman", serif;
/*from miyuki_curve.png*/
--miyuki-hair: #F9C4D1;
--miyuki-hair-tint: #FCE2F4;
--miyuki-hair-shade: #E291A5;
/*from character song vol001 izumi konata*/
--konata-hair: #5292CF;
--konata-hair-tint: #C7DBF3;
--konata-hair-shade: #2570B4;
--box-radius: 1em;
}
.mw-body-content {
font-family: Times New Roman;
}
.mw-body-content a,
.mw-body-content a:visited {
color: var(--article-color);
text-decoration-line: underline;
text-decoration-thickness: 1px;
}
.mw-body-content a.new,
.mw-body-content a.new:visited {
color: var(--link-none);
}
/*Hovering should still produce a color change,*/
/*so I will not change that yet.*/
/*If we decide to override the hover color,*/
/*we may wish to preserve the distinction between :hover and :visited:hover*/
/*box, toc*/
:is(.box, .toc)::before {
content: "";
display: block;
position: absolute;
border-left: 0.5em solid var(--miyuki-hair-tint);
border-top: 0.5em solid var(--miyuki-hair-tint);
top: 0;
left: 0;
bottom: 0;
right: 0;
pointer-events: none;
border-radius: var(--box-radius);
}
.box, .toc {
display:block;
background-color: var(--miyuki-hair);
border: 2px solid #000;
padding: 0 1em;
box-shadow: 5px 5px var(--miyuki-hair-shade);
position: relative;
margin-bottom: 1em;
border-radius: var(--box-radius);
width:min-content;
}
.toc .toctitle {
margin-top: 1em;
border-bottom: 2px solid var(--miyuki-hair-shade);
}
/*konata box*/
:is(.box, .toc).konata::before {
border-left: 0.5em solid var(--konata-hair-tint);
border-top: 0.5em solid var(--konata-hair-tint);
}
:is(.box, .toc).konata {
background-color: var(--konata-hair);
box-shadow: 5px 5px var(--konata-hair-shade);
}
/*infobox*/
.infobox .header {
text-wrap: auto;
text-align: center;
}
.infobox :is(th, td) {
vertical-align: top;
}
.infobox th {
text-wrap: nowrap;
text-align: left;
}
/*file*/
figure[typeof~="mw:File/Thumb"], figure[typeof~="mw:File/Frame"] {
display: block;
border: 2px solid #000;
background-color: var(--miyuki-hair);
box-shadow: 5px 5px var(--miyuki-hair-shade);
position: relative;
width: min-content;
border-radius: var(--box-radius);
}
:is(figure[typeof~="mw:File/Thumb"], figure[typeof~="mw:File/Frame"])::before {
content: "";
display: block;
position: absolute;
border-left: 0.5em solid var(--miyuki-hair-tint);
top: 0;
left: 0;
bottom: 0;
right: 0;
border-top: 0.5em solid var(--miyuki-hair-tint);
pointer-events: none;
border-radius: var(--box-radius);
}
.mw-body-content figure[typeof~="mw:File/Thumb"] > a, .mw-body-content figure[typeof~="mw:File/Frame"] > a {
width: max-content;
}
:is(figure[typeof~="mw:File/Thumb"], figure[typeof~="mw:File/Frame"]) > :not(figcaption) .mw-file-element {
border: 0;
background-color: #FFF;
}
figure[typeof~="mw:File/Thumb"] > figcaption, figure[typeof~="mw:File/Frame"] > figcaption {
display: block;
background: none;
border: none;
}
/*table*/
table.bordered {
border-collapse: collapse;
}
table.bordered :is(td, th) {
border-right: 1px solid;
border-bottom: 1px solid;
padding-left: 0.25em;
padding-right: 0.25em;
}
table.bordered :is(td:first-child, th:first-child) {
border-left: 1px solid;
}
table.bordered tr:first-of-type {
border-top: 1px solid;
}
table.bordered .nocol {
border-right: none;
}
table.bordered .norow {
border-bottom: none;
}
/*language*/
[lang="ja"] {
/*from https://stackoverflow.com/a/14573813*/
font-family:"ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro",Osaka, "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", sans-serif;
}
/*lang class*/
.lang {
font-style: italic;
}
.lang[lang="ja"] {
font-style: normal;
}
.lang[lang="ja-Latn-fonipa"] {
font-style: normal;
}
/*For Template:Phone and Template:Phoneme*/
i.ipa {
font-family: var(--font-ipa);
font-style: inherit;
}
/*general*/
em {
font-style: inherit;
font-variant: small-caps;
}
code.URI {
border: none;
background: none;
font-family: monospace;
font-size: 1em;
margin: 0;
padding: 0;
color: inherit;
}
blockquote {
width: fit-content;
position: relative;
}
blockquote::after {
content: "”";
position: absolute;
right: -0.5em;
font-size: 2em;
bottom: -0.5em;
}
blockquote::before {
content: "“";
position: absolute;
left: -0.5em;
font-size: 2em;
top: -0.25em;
}
/*Bibliography*/
ul.bibliography-list {
margin-left: 0;
}
ul.bibliography-list > li {
padding-left: 2em;
text-indent: -2em;
list-style: none;
}
/*Target*/
/*Marks the target of url*/
/*#target*/
h2:target::before,
h3:target::before,
h4:target::before,
h5:target::before,
h6:target::before {
content: "☞";
position:absolute;
margin-left: -1em;
}
/*Edit page*/
/*The edit page by default is styled similarly to other pages,*/
/*but this results in a lot of dead space on screen,*/
/*which could be better allocated to the editor,*/
/*so that editing can be more efficient.*/
.action-edit #mw-content-block {
display:block;
}
/*Navbox*/
:root {
--navbox-subgroup-bg: var(--miyuki-hair-tint); /*Default: #fdfdfd*/
--navbox-l1-bg: var(--miyuki-hair); /*Default: #ccf*/
--navbox-l2-bg: var(--miyuki-hair); /*Default: #ddf*/
--navbox-l3-bg: var(--miyuki-hair); /*Default: #e6e6ff*/
--navbox-even-bg: var(--miyuki-hair-tint); /*Default: #f7f7f7*/
}
.navbox {
box-sizing: border-box;
border: 1px solid #a2a9b1;
width: 100%;
clear: both;
font-size: 88%;
text-align: center;
padding: 1px;
margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */
}
.navbox .navbox {
margin-top: 0; /* No top margin for nested navboxes */
}
.navbox + .navbox, /* TODO: remove first line after transclusions have updated */
.navbox + .navbox-styles + .navbox {
margin-top: -1px; /* Single pixel border between adjacent navboxes */
}
.navbox-inner,
.navbox-subgroup {
width: 100%;
}
.navbox-group,
.navbox-title,
.navbox-abovebelow {
padding: 0.25em 1em;
line-height: 1.5em;
text-align: center;
}
.navbox-group {
white-space: nowrap;
/* @noflip */
text-align: right;
}
.navbox,
.navbox-subgroup {
background-color: var(--navbox-subgroup-bg);
color:inherit;
}
.navbox-list {
line-height: 1.5em;
border-color: var(--navbox-subgroup-bg); /* Must match background color */
}
.navbox-list-with-group {
text-align: left;
border-left-width: 2px;
border-left-style: solid;
}
/* cell spacing for navbox cells */
/* Borders above 2nd, 3rd, etc. rows */
/* TODO: figure out how to replace tr as structure;
* with div structure it should be just a matter of first-child */
tr + tr > .navbox-abovebelow,
tr + tr > .navbox-group,
tr + tr > .navbox-image,
tr + tr > .navbox-list {
border-top: 2px solid var(--navbox-subgroup-bg); /* Must match background color */
}
.navbox-title {
background-color: var(--navbox-l1-bg); /* Level 1 color */
color:inherit;
}
.navbox-abovebelow,
.navbox-group,
.navbox-subgroup .navbox-title {
background-color: var(--navbox-l2-bg); /* Level 2 color */
color:inherit;
}
.navbox-subgroup .navbox-group,
.navbox-subgroup .navbox-abovebelow {
background-color: var(--navbox-l3-bg); /* Level 3 color */
color:inherit;
}
.navbox-even {
background-color: var(--navbox-even-bg);
color:inherit;
}
.navbox-odd {
background-color: transparent;
color:inherit;
}
/* TODO: figure out how to remove reliance on td as structure */
.navbox .hlist td dl,
.navbox .hlist td ol,
.navbox .hlist td ul,
.navbox td.hlist dl,
.navbox td.hlist ol,
.navbox td.hlist ul {
padding: 0.125em 0;
}
.navbox .navbar {
display: block;
font-size: 100%;
}
.navbox-title .navbar {
/* @noflip */
float: left;
/* @noflip */
text-align: left;
/* @noflip */
margin-right: 0.5em;
}
/*hlist*/
/*
* hlist styles are defined in core and Minerva and differ in Minerva. The
* current definitions here (2023-01-01) are sufficient to override Minerva
* without use of the hlist-separated class. The most problematic styles were
* related to margin, padding, and the bullet. Check files listed at
* [[MediaWiki talk:Common.css/to do#hlist-separated]]
*/
/*
* TODO: When the majority of readership supports it (or some beautiful world
* in which grade C support is above the minimum threshold), use :is()
*/
.hlist dl,
.hlist ol,
.hlist ul {
margin: 0;
padding: 0;
}
/* Display list items inline */
.hlist dd,
.hlist dt,
.hlist li {
/*
* don't trust the note that says margin doesn't work with inline
* removing margin: 0 makes dds have margins again
* We also want to reset margin-right in Minerva
*/
margin: 0;
display: inline;
}
/* Display requested top-level lists inline */
.hlist.inline,
.hlist.inline dl,
.hlist.inline ol,
.hlist.inline ul,
/* Display nested lists inline */
.hlist dl dl,
.hlist dl ol,
.hlist dl ul,
.hlist ol dl,
.hlist ol ol,
.hlist ol ul,
.hlist ul dl,
.hlist ul ol,
.hlist ul ul {
display: inline;
}
/* Hide empty list items */
.hlist .mw-empty-li {
display: none;
}
/* TODO: :not() can maybe be used here to remove the later rule. naive test
* seems to work. more testing needed. like so:
*.hlist dt:not(:last-child)::after {
* content: ": ";
*}
*.hlist dd:not(:last-child)::after,
*.hlist li:not(:last-child)::after {
* content: " · ";
* font-weight: bold;
*}
*/
/* Generate interpuncts */
.hlist dt::after {
content: ": ";
}
.hlist dd::after,
.hlist li::after {
content: " · ";
font-weight: bold;
}
.hlist dd:last-child::after,
.hlist dt:last-child::after,
.hlist li:last-child::after {
content: none;
}
/* Add parentheses around nested lists */
.hlist dd dd:first-child::before,
.hlist dd dt:first-child::before,
.hlist dd li:first-child::before,
.hlist dt dd:first-child::before,
.hlist dt dt:first-child::before,
.hlist dt li:first-child::before,
.hlist li dd:first-child::before,
.hlist li dt:first-child::before,
.hlist li li:first-child::before {
content: " (";
font-weight: normal;
}
.hlist dd dd:last-child::after,
.hlist dd dt:last-child::after,
.hlist dd li:last-child::after,
.hlist dt dd:last-child::after,
.hlist dt dt:last-child::after,
.hlist dt li:last-child::after,
.hlist li dd:last-child::after,
.hlist li dt:last-child::after,
.hlist li li:last-child::after {
content: ")";
font-weight: normal;
}
/* Put ordinals in front of ordered list items */
.hlist ol {
counter-reset: listitem;
}
.hlist ol > li {
counter-increment: listitem;
}
.hlist ol > li::before {
content: " " counter(listitem) "\a0";
}
.hlist dd ol > li:first-child::before,
.hlist dt ol > li:first-child::before,
.hlist li ol > li:first-child::before {
content: " (" counter(listitem) "\a0";
}
/** T367463 */
body.skin--responsive .navbox-image img {
max-width: none !important;
}
@media print {
body.ns-0 .navbox {
display: none !important;
}
}