151
edits
m |
|||
Line 14: | Line 14: | ||
} | } | ||
/* 1) | /* 1) Config */ | ||
:root{ | :root{ | ||
/* If | /* If using Adobe Fonts: set the first item to the EXACT family name from your kit CSS | ||
-- | (often "century-gothic"). If not, keep "Century Gothic" first to use system-installed font. */ | ||
--title- | --title-font: "century-gothic", "Century Gothic", "URW Gothic L", "Apple Gothic", "Avant Garde", sans-serif; | ||
--title- | --title-stroke: 0.0035em; /* 0.35% of font size */ | ||
--title-stroke-color: #000; /* outline colour (auto-switched in dark mode below) */ | |||
} | } | ||
/* 2) Target page titles across common skins */ | |||
/* | .mw-page-title-main, | ||
h1#firstHeading, | h1#firstHeading, | ||
.firstHeading { | .firstHeading { | ||
font-family: var(-- | font-family: var(--title-font) !important; | ||
-webkit-font-smoothing: antialiased; | |||
-moz-osx-font-smoothing: grayscale; | |||
-webkit- | } | ||
/* 3) True stroke where supported (Chromium/Edge/Safari) */ | |||
@supports (-webkit-text-stroke: 1px black) { | |||
.mw-page-title-main, | |||
h1#firstHeading, | |||
.firstHeading { | |||
-webkit-text-stroke: var(--title-stroke) var(--title-stroke-color); | |||
text-stroke: var(--title-stroke) var(--title-stroke-color); | |||
-webkit-text-fill-color: currentColor; /* preserve the fill as the current text colour */ | |||
text-shadow: none; /* avoid double-thick look */ | |||
} | |||
} | } | ||
/* | /* 4) 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-color), | |||
calc(-1 * var(--title-stroke)) 0 0 var(--title-stroke-color), | |||
0 var(--title-stroke) 0 var(--title-stroke-color), | |||
0 calc(-1 * var(--title-stroke)) 0 var(--title-stroke-color), | |||
var(--title-stroke) var(--title-stroke) 0 var(--title-stroke-color), | |||
calc(-1 * var(--title-stroke)) var(--title-stroke) 0 var(--title-stroke-color), | |||
var(--title-stroke) calc(-1 * var(--title-stroke)) 0 var(--title-stroke-color), | |||
calc(-1 * var(--title-stroke)) calc(-1 * var(--title-stroke)) 0 var(--title-stroke-color); | |||
} | |||
} | } | ||
/* | /* 5) Dark mode: make the outline light for contrast */ | ||
@media (prefers-color-scheme: dark) { | |||
:root { --title-stroke-color: rgba(255,255,255,0.85); } | |||
} | } | ||
/* | /* 6) Keep subtitles clean */ | ||
#siteSub, .subtitle { -webkit-text-stroke: 0; text-stroke: 0; text-shadow: none; } | |||
. | |||
} |