MediaWiki:Common.css: Difference between revisions

m
no edit summary
m
m
Line 14: Line 14:
}
}


/* === Global Century Gothic + bold page title (Vector 2022 & legacy) === */
:root{
 
   /* Exact family name first if your kit exposes it (often "century-gothic") */
/* (Optional) If you use Adobe Fonts, keep this import and swap to your kit URL. */
   --cg-stack: "century-gothic", "Century Gothic", "URW Gothic L", "Apple Gothic", "Avant Garde", sans-serif;
 
   --outline-size: 0.0035em;   /* 0.35% of font size */
/* 1) Config */
   --outline-colour: #000;
:root {
   /* Put the EXACT Adobe family first if using a kit (often "century-gothic"). */
   --wiki-font: "century-gothic", "Century Gothic", "URW Gothic L", "Apple Gothic", "Avant Garde", sans-serif;
 
  /* Title look */
   --title-weight: 700;          /* make the title actually bold */
  --title-stroke: 0.0035em;       /* 1% outline – beefier than 0.35% */
   --title-stroke-colour: #000000;
}
 
/* Dark mode contrast */
@media (prefers-color-scheme: dark) {
  :root { --title-stroke-colour: rgba(255,255,255,0.85); }
}
 
/* 2) Set the font site-wide (content, nav, menus, tables, forms) */
html, body,
.mw-body, .mw-parser-output, .vector-body,
.vector-header, .vector-toc, .vector-menu, #mw-panel, /* legacy Vector side panel */
.mw-headline, p, li, td, th, caption,
h1, h2, h3, h4, h5, h6,
input, textarea, select, button, .mw-ui-button {
  font-family: var(--wiki-font) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
}


/* 3) Page title styling (works for Vector 2022 & legacy) */
/* Core content + interface */
.mw-page-title-main,
html, body, .mw-body, .mw-parser-output, .vector-body,
h1#firstHeading,
.mw-content-ltr, .mw-content-rtl, p, li, td, th, caption,
.firstHeading {
h1, h2, h3, h4, h5, h6, #mw-head, #mw-panel, .vector-menu-content,
   font-weight: var(--title-weight) !important;
#p-personal, .mw-portlet, .vector-feature-zebra-design .vector-body,
  line-height: 1.15;
input, button, select, textarea {
  letter-spacing: 0;
   font-family: var(--cg-stack) !important;
}
}


/* Real stroke where supported */
/* Site-wide outline, excluding code/math/SVG/controls */
@supports (-webkit-text-stroke: 1px black) {
:where(body) :where(
  .mw-page-title-main,
  p, li, a, span, div, strong, em, small, b, i,
  h1#firstHeading,
  h1, h2, h3, h4, h5, h6, td, th, caption, dt, dd,
   .firstHeading {
  .vector-menu-heading, .mw-headline, .mw-portlet, .vector-menu-content
    -webkit-text-stroke: var(--title-stroke) var(--title-stroke-colour);
):not(pre):not(code):not(kbd):not(samp):not(tt)
    text-stroke: var(--title-stroke) var(--title-stroke-colour);
:not(.mw-code):not(.mw-highlight):not(.mwe-math-element)
    -webkit-text-fill-color: currentColor; /* keep normal fill */
:not(svg):not(input):not(select):not(textarea):not(button) {
     text-shadow: none;                      /* avoid double effect */
   -webkit-text-stroke: var(--outline-size) var(--outline-colour);
  }
  text-stroke: var(--outline-size) var(--outline-colour);
  -webkit-text-fill-color: currentColor;
  text-shadow:
    var(--outline-size) 0 0 var(--outline-colour),
    calc(-1 * var(--outline-size)) 0 0 var(--outline-colour),
    0 var(--outline-size) 0 var(--outline-colour),
    0 calc(-1 * var(--outline-size)) 0 var(--outline-colour),
    var(--outline-size) var(--outline-size) 0 var(--outline-colour),
     calc(-1 * var(--outline-size)) var(--outline-size) 0 var(--outline-colour),
    var(--outline-size) calc(-1 * var(--outline-size)) 0 var(--outline-colour),
    calc(-1 * var(--outline-size)) calc(-1 * var(--outline-size)) 0 var(--outline-colour);
}
}


/* Firefox fallback (simulate stroke with shadows) */
pre, code, kbd, samp, tt, .mw-code, .mw-highlight, .mwe-math-element {
@supports not (-webkit-text-stroke: 1px black) {
  -webkit-text-stroke: 0 !important;
   .mw-page-title-main,
   text-stroke: 0 !important;
   h1#firstHeading,
   text-shadow: none !important;
  .firstHeading {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    text-shadow:
      var(--title-stroke) 0 0 var(--title-stroke-colour),
      calc(-1 * var(--title-stroke)) 0 0 var(--title-stroke-colour),
      0 var(--title-stroke) 0 var(--title-stroke-colour),
      0 calc(-1 * var(--title-stroke)) 0 var(--title-stroke-colour),
      var(--title-stroke) var(--title-stroke) 0 var(--title-stroke-colour),
      calc(-1 * var(--title-stroke)) var(--title-stroke) 0 var(--title-stroke-colour),
      var(--title-stroke) calc(-1 * var(--title-stroke)) 0 var(--title-stroke-colour),
      calc(-1 * var(--title-stroke)) calc(-1 * var(--title-stroke)) 0 var(--title-stroke-colour);
  }
}
}
/* Keep subtitles clean */
#siteSub, .subtitle { -webkit-text-stroke: 0; text-stroke: 0; text-shadow: none; }