MediaWiki:Common.css: Difference between revisions

From Formula One Wiki
Jump to navigation Jump to search
m
m
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* CSS placed here will be applied to all skins */
@import url('https://use.typekit.net/oov2wcw.css');
@import url('https://use.typekit.net/bus4qvu.css');


.skin-minerva.page-Main_Page #firstHeading {
.skin-minerva.page-Main_Page #firstHeading {
Line 14: Line 14:
}
}


/* === Global Century Gothic + bold page title (Vector 2022 & legacy) === */
/* Global variables (use the EXACT family names exposed by the kit CSS) */
:root{
  --font-prominent: "century-gothic", "Century Gothic", "URW Gothic L", "Apple Gothic", "Avant Garde", sans-serif;
  --font-body: "myriad-pro", "Myriad Pro", "Myriad", "Segoe UI", "Helvetica Neue", Arial, sans-serif;


/* (Optional) If you use Adobe Fonts, keep this import and swap to your kit URL. */
   --outline-size: 0.0035em; /* 0.35% */
 
   --outline-colour: #000;
/* 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.0035em;       /* 1% outline – beefier than 0.35% */
   --title-stroke-colour: #000000;
}
}


/* Dark mode contrast */
/* Default = Myriad Pro for non-prominent text */
@media (prefers-color-scheme: dark) {
html, body, .mw-body, .mw-parser-output, .vector-body,
   :root { --title-stroke-colour: rgba(255,255,255,0.85); }
.mw-content-ltr, .mw-content-rtl,
p, li, a, span, strong, em, small, td, th, caption, dt, dd,
.vector-menu-content, .mw-portlet, #mw-panel,
#p-personal, #mw-head,
input, button, select, textarea {
  font-family: var(--font-body) !important;
   -webkit-text-stroke: 0; text-stroke: 0; text-shadow: none; /* no outline on body text */
}
}


/* 2) Set the font site-wide (content, nav, menus, tables, forms) */
/* Prominent elements = Century Gothic + 0.35% outline */
html, body,
h1#firstHeading,
.mw-body, .mw-parser-output, .vector-body,
#firstHeading .mw-page-title-main,
.vector-header, .vector-toc, .vector-menu, #mw-panel, /* legacy Vector side panel */
.firstHeading,
.mw-headline, p, li, td, th, caption,
.mw-headline,
h1, h2, h3, h4, h5, h6,
#mw-panel .vector-menu-heading,
input, textarea, select, button, .mw-ui-button {
.vector-menu-heading {
   font-family: var(--wiki-font) !important;
   font-family: var(--font-prominent) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* 3) Page title styling (works for Vector 2022 & legacy) */
  /* Outline */
.mw-page-title-main,
  -webkit-text-stroke: var(--outline-size) var(--outline-colour);
h1#firstHeading,
   text-stroke: var(--outline-size) var(--outline-colour);
.firstHeading {
   -webkit-text-fill-color: currentColor;
  font-weight: var(--title-weight) !important;
   line-height: 1.15;
   letter-spacing: 0;
}


/* Real stroke where supported */
  /* Firefox fallback for outline */
@supports (-webkit-text-stroke: 1px black) {
  text-shadow:
  .mw-page-title-main,
    var(--outline-size) 0 0 var(--outline-colour),
  h1#firstHeading,
    calc(-1 * var(--outline-size)) 0 0 var(--outline-colour),
  .firstHeading {
    0 var(--outline-size) 0 var(--outline-colour),
     -webkit-text-stroke: var(--title-stroke) var(--title-stroke-colour);
    0 calc(-1 * var(--outline-size)) 0 var(--outline-colour),
     text-stroke: var(--title-stroke) var(--title-stroke-colour);
     var(--outline-size) var(--outline-size) 0 var(--outline-colour),
     -webkit-text-fill-color: currentColor;  /* keep normal fill */
     calc(-1 * var(--outline-size)) var(--outline-size) 0 var(--outline-colour),
     text-shadow: none;                      /* avoid double effect */
     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) */
/* Keep code/math monospace and un-outlined */
@supports not (-webkit-text-stroke: 1px black) {
pre, code, kbd, samp, tt, .mw-code, .mw-highlight, .mwe-math-element {
   .mw-page-title-main,
   -webkit-text-stroke: 0 !important;
   h1#firstHeading,
   text-stroke: 0 !important;
   .firstHeading {
   text-shadow: none !important;
    text-shadow:
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
      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; }

Latest revision as of 14:58, 10 October 2025

/* CSS placed here will be applied to all skins */
@import url('https://use.typekit.net/bus4qvu.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 variables (use the EXACT family names exposed by the kit CSS) */
:root{
  --font-prominent: "century-gothic", "Century Gothic", "URW Gothic L", "Apple Gothic", "Avant Garde", sans-serif;
  --font-body: "myriad-pro", "Myriad Pro", "Myriad", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --outline-size: 0.0035em;  /* 0.35% */
  --outline-colour: #000;
}

/* Default = Myriad Pro for non-prominent text */
html, body, .mw-body, .mw-parser-output, .vector-body,
.mw-content-ltr, .mw-content-rtl,
p, li, a, span, strong, em, small, td, th, caption, dt, dd,
.vector-menu-content, .mw-portlet, #mw-panel,
#p-personal, #mw-head,
input, button, select, textarea {
  font-family: var(--font-body) !important;
  -webkit-text-stroke: 0; text-stroke: 0; text-shadow: none; /* no outline on body text */
}

/* Prominent elements = Century Gothic + 0.35% outline */
h1#firstHeading,
#firstHeading .mw-page-title-main,
.firstHeading,
.mw-headline,
#mw-panel .vector-menu-heading,
.vector-menu-heading {
  font-family: var(--font-prominent) !important;

  /* Outline */
  -webkit-text-stroke: var(--outline-size) var(--outline-colour);
  text-stroke: var(--outline-size) var(--outline-colour);
  -webkit-text-fill-color: currentColor;

  /* Firefox fallback for outline */
  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);
}

/* Keep code/math monospace and un-outlined */
pre, code, kbd, samp, tt, .mw-code, .mw-highlight, .mwe-math-element {
  -webkit-text-stroke: 0 !important;
  text-stroke: 0 !important;
  text-shadow: none !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
}