MediaWiki:Common.css

From Formula One Wiki
Revision as of 14:33, 10 October 2025 by Formula (talk | contribs)
Jump to navigation Jump to search

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)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* CSS placed here will be applied to all skins */
@import url('https://use.typekit.net/oov2wcw.css');

.skin-minerva.page-Main_Page #firstHeading {
    display: none;
}

/*  visualClear CSS class definition for SocialProfile extension
    because Vector does not include the definition anymore; see
    https://phabricator.wikimedia.org/T328235 and 
    https://phabricator.wikimedia.org/T287962 */
.visualClear {
	clear: both;
}

/* === Global Century Gothic + bold page title (Vector 2022 & legacy) === */

/* (Optional) If you use Adobe Fonts, keep this import and swap to your kit URL. */

/* 1) Config */
: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.01em;       /* 1% outline – beefier than 0.35% */
  --title-stroke-colour: #000;
}

/* 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) */
.mw-page-title-main,
h1#firstHeading,
.firstHeading {
  font-weight: var(--title-weight) !important;
  line-height: 1.15;
  letter-spacing: 0;
}

/* Real stroke where supported */
@supports (-webkit-text-stroke: 1px black) {
  .mw-page-title-main,
  h1#firstHeading,
  .firstHeading {
    -webkit-text-stroke: var(--title-stroke) var(--title-stroke-colour);
    text-stroke: var(--title-stroke) var(--title-stroke-colour);
    -webkit-text-fill-color: currentColor;  /* keep normal fill */
    text-shadow: none;                       /* avoid double effect */
  }
}

/* Firefox fallback (simulate stroke with shadows) */
@supports not (-webkit-text-stroke: 1px black) {
  .mw-page-title-main,
  h1#firstHeading,
  .firstHeading {
    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; }