MediaWiki:Timeless.css: Difference between revisions

Created page with "→All CSS here will be loaded for users of the Timeless skin: /* ========================================================= Bellingham Heritage Centre – Timeless branding (CSS-only) Steps 1–5: 1) Fonts, weights, heading style 2) Timeless header styling (full width) 3) Search box sizing + right alignment 4) Timeless footer styling (full width) 5) Replace text site logo with actual logo (CSS-only) ====================================..."
 
No edit summary
Line 1: Line 1:
/* All CSS here will be loaded for users of the Timeless skin */
/* All CSS here will be loaded for users of the Timeless skin */
/* =========================================================
/* =========================================================
   Bellingham Heritage Centre – Timeless branding (CSS-only)
   Bellingham Heritage Centre – Timeless skin branding
   Steps 1–5:
  CSS-only approach (no PHP/JS)
    1) Fonts, weights, heading style
   Applies ONLY when the Timeless skin is in use.
    2) Timeless header styling (full width)
    3) Search box sizing + right alignment
    4) Timeless footer styling (full width)
    5) Replace text site logo with actual logo (CSS-only)
   ========================================================= */
   ========================================================= */


/* ---------- Palette + typography ---------- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Condensed:wght@400;700&family=Satisfy&display=swap');
:root{
 
body.skin-timeless{
  /* Palette */
   --bhc-teal: rgb(130,156,149);
   --bhc-teal: rgb(130,156,149);
   --bhc-olive: rgb(165,174,121);
   --bhc-olive: rgb(165,174,121);
Line 18: Line 16:
   --bhc-link: #005DB3;
   --bhc-link: #005DB3;
   --bhc-text: #202020;
   --bhc-text: #202020;
  --bhc-muted: #4b4b4b;
  --bhc-paper: #f6f6f6;
  --bhc-radius: 8px;
}
/* Optional: Google Fonts (if CSP blocks, it will just fall back) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Condensed:wght@400;700&display=swap');


/* Scope to Timeless only */
  /* Fonts */
body.skin-timeless{
   --bhc-body-font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
   --bhc-body-font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
   --bhc-heading-font: "Roboto Condensed", "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
   --bhc-heading-font: "Roboto Condensed", "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
 
   --bhc-accent-font: "Satisfy", cursive;
   font-family: var(--bhc-body-font);
  color: var(--bhc-text);


   /* Readability */
   /* Readability */
Line 46: Line 33:
}
}


/* Links */
/* ---------------------------------------------------------
  Global typography (content)
  --------------------------------------------------------- */
 
body.skin-timeless,
body.skin-timeless .mw-body,
body.skin-timeless .mw-parser-output{
  font-family: var(--bhc-body-font);
  color: var(--bhc-text);
}
 
body.skin-timeless a{ color: var(--bhc-link); }
body.skin-timeless a{ color: var(--bhc-link); }
body.skin-timeless a:hover{ text-decoration: underline; }
body.skin-timeless a:hover{ text-decoration: underline; }


/* Headings */
body.skin-timeless .mw-parser-output h1,
body.skin-timeless .mw-parser-output h1,
body.skin-timeless .mw-parser-output h2,
body.skin-timeless .mw-parser-output h2,
body.skin-timeless .mw-parser-output h3,
body.skin-timeless .mw-parser-output h3{
body.skin-timeless .mw-parser-output h4{
   font-family: var(--bhc-heading-font);
   font-family: var(--bhc-heading-font);
   letter-spacing: .02em;
   letter-spacing: .02em;
Line 86: Line 81:
}
}


/* Paragraph rhythm + lists */
body.skin-timeless .mw-parser-output p{ margin: 0.75rem 0; }
body.skin-timeless .mw-parser-output p{ margin: 0.75rem 0; }
body.skin-timeless .mw-parser-output ul,
body.skin-timeless .mw-parser-output ul,
body.skin-timeless .mw-parser-output ol{ margin: 0.6rem 0 0.9rem 1.25rem; }
body.skin-timeless .mw-parser-output ol{ margin: 0.6rem 0 0.9rem 1.25rem; }
body.skin-timeless .mw-parser-output li{ margin: 0.2rem 0; }
body.skin-timeless .mw-parser-output li{ margin: 0.2rem 0; }


/* Slightly less tiny “small UI text” */
body.skin-timeless #toc,
body.skin-timeless #toc,
body.skin-timeless .toc,
body.skin-timeless .toc,
Line 104: Line 99:
}
}


/* Optional accent class you can use in wiki content */
body.skin-timeless .bhc-script{ font-family: var(--bhc-accent-font); }


/* =========================================================
/* ---------------------------------------------------------
   Timeless header (full width) – closer to main site
   HEADER: make Timeless header full-width + BHC palette
   ========================================================= */
   --------------------------------------------------------- */


/* The Timeless header wrapper */
/* The overall header bar */
body.skin-timeless #mw-header-container{
body.skin-timeless #mw-header-container{
   background: var(--bhc-teal);
   background: var(--bhc-teal) !important;
   border-top: 5px solid var(--bhc-olive);
   border-top: 5px solid var(--bhc-olive) !important;
   border-bottom: 10px solid var(--bhc-sand);
   border-bottom: 10px solid var(--bhc-sand) !important;
}
}


/* Remove/soften Timeless decorative bars that fight your palette */
/* Ensure header content can host an absolutely-positioned strapline */
body.skin-timeless #mw-header-hack,
body.skin-timeless #mw-header{
body.skin-timeless #mw-header-nav-hack{
   position: relative;
   display: none;
   padding-top: 8px;
}
   padding-bottom: 18px; /* breathing room below header */
 
/* Make the inner header content breathe */
body.skin-timeless #mw-header.ts-inner{
   padding-top: 10px;
   padding-bottom: 10px;
}
 
/* (Optional) Tidy the “user tools” a bit on the teal background */
body.skin-timeless #user-tools,
body.skin-timeless #personal,
body.skin-timeless #p-personal-label,
body.skin-timeless #p-personal a{
  color: #fff;
}
}


body.skin-timeless #p-personal a:hover{
/* Make header text white by default */
   text-decoration: underline;
body.skin-timeless #mw-header,
body.skin-timeless #mw-header a{
   color: #fff !important;
}
}


/* =========================================================
/* ---------------------------------------------------------
   Step 5: Replace text site logo with actual logo (CSS-only)
   1) SITE TITLE + LOGO: keep title visible, add logo at left
   ========================================================= */
   Timeless uses: #p-logo-text a#p-banner
 
  --------------------------------------------------------- */
/*
  Timeless puts the text title in:
    <div id="p-logo-text"><a id="p-banner" class="mw-wiki-title ...">...</a></div>


  We convert that anchor into a logo block.
  NOTE: Update the image URL if your logo file path differs.
*/
body.skin-timeless #p-logo-text{
body.skin-timeless #p-logo-text{
   /* keep it in the header flow */
   position: relative;
}
}


body.skin-timeless a#p-banner.mw-wiki-title{
/* Show the title text, and make room for a logo to the left */
body.skin-timeless #p-logo-text #p-banner{
   display: inline-block;
   display: inline-block;
   width: 320px;           /* adjust later */
   font-family: var(--bhc-heading-font) !important;
   height: 56px;           /* adjust later */
   font-weight: 700;
   max-width: 60vw;
   font-size: 1.35rem;
   background: url(/resources/assets/BHClogo.jpg) left center / contain no-repeat;
   letter-spacing: .02em;
  color: transparent;     /* hide text */
   text-decoration: none;
   text-decoration: none;
  overflow: hidden;
  white-space: nowrap;
}


/* If Timeless forces text visibility via spans, belt-and-braces */
  /* Logo */
body.skin-timeless a#p-banner.mw-wiki-title *{
  background-image: url(/resources/assets/BHClogo.jpg);
   visibility: hidden;
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 56px 56px;
 
  /* Space for logo + a little gap */
  padding-left: 72px;
  min-height: 56px;
   line-height: 56px; /* vertically align title with logo */
}
}


/* Hide the sidebar logo so you don’t get it twice */
/* Remove/Hide Timeless sidebar logo so we don’t double-brand */
body.skin-timeless #mw-site-navigation #p-logo{
body.skin-timeless #mw-site-navigation #p-logo{
   display: none !important;
   display: none !important;
}
}


/* ---------------------------------------------------------
  2) STRAPLINE (Option A): reuse #siteSub and position it in header
  Timeless normally shows this under the page title.
  We visually move it into the header under the site title.
  --------------------------------------------------------- */


/* =========================================================
/* Keep it available in DOM, but position it where we want */
  Step 3: Search box – reduce size and keep it right
body.skin-timeless #siteSub{
  ========================================================= */
  position: absolute;
  /* Align under the site title text start (same padding-left as #p-banner) */
  left: calc(56px + 16px); /* 56 logo + 16 gap = 72px */
  top: 54px;              /* sits under the site title */
  margin: 0;
  padding: 0;
 
  font-family: var(--bhc-body-font);
  font-size: 1.0rem;
  line-height: 1.25;
  font-style: normal;
  color: rgba(255,255,255,.92) !important;


/* The Timeless search portlet lives in the header: #p-search */
  /* Make sure it appears above other header bits */
body.skin-timeless #p-search{
  z-index: 2;
   margin-left: auto;
   pointer-events: none; /* avoid odd selection/overlap issues */
}
}


/* Ensure header content aligns nicely in one row (Timeless already does, but this helps) */
/* Prevent #siteSub reserving visible space in the content area */
body.skin-timeless #mw-header{
body.skin-timeless #bodyContentOuter #siteSub{
   display: flex;
   height: 0;
   align-items: center;
   overflow: visible; /* still allows it to render in header */
  gap: 14px;
  flex-wrap: wrap;
}
}


/* Logo/title block first, then search pushed right */
/* ---------------------------------------------------------
body.skin-timeless #p-logo-text{ flex: 0 1 auto; }
  3) SEARCH: smaller, right-aligned, white background + dark text
body.skin-timeless #p-search{ flex: 1 1 auto; display: flex; justify-content: flex-end; }
  Timeless uses: #p-search #searchInput
  --------------------------------------------------------- */


/* Make the search input more “site-like” and smaller */
body.skin-timeless #p-search{
body.skin-timeless #p-search form#searchform{
   margin-left: auto;
   display: flex;
  align-items: center;
  gap: .5rem;
}
}


/* Input */
/* The input itself */
body.skin-timeless #p-search input#searchInput{
body.skin-timeless #p-search input[type="search"],
   width: min(320px, 42vw);
body.skin-timeless #p-search #searchInput{
   width: min(360px, 34vw);
   max-width: 100%;
   max-width: 100%;
   padding: .42rem .6rem;
 
   padding: .45rem .7rem;
   border-radius: 6px;
   border-radius: 6px;
   border: 1px solid rgba(255,255,255,.45);
 
   background: rgba(255,255,255,.12);
  background: #fff !important;      /* per your request */
   color: #fff;
  color: #202020 !important;        /* readable on white */
   caret-color: #fff;
  caret-color: #202020 !important;
   font-family: var(--bhc-body-font);
 
   border: 1px solid rgba(0,0,0,.15) !important;
   box-shadow: none !important;
 
   /* Remove browser “search field” styling that adds odd internal UI */
   -webkit-appearance: none;
   appearance: none;
}
}


/* Placeholder */
/* Placeholder */
body.skin-timeless #p-search input#searchInput::placeholder{
body.skin-timeless #p-search input[type="search"]::placeholder,
   color: rgba(255,255,255,.78);
body.skin-timeless #p-search #searchInput::placeholder{
   color: rgba(0,0,0,.55) !important;
}
}


/* Buttons */
/* Remove the internal “X / decorations” in WebKit search fields */
body.skin-timeless #p-search input.searchButton,
body.skin-timeless #p-search input[type="search"]::-webkit-search-decoration,
body.skin-timeless #p-search button,
body.skin-timeless #p-search input[type="search"]::-webkit-search-cancel-button,
body.skin-timeless #p-search input[type="submit"]{
body.skin-timeless #p-search input[type="search"]::-webkit-search-results-button,
  padding: .42rem .65rem;
body.skin-timeless #p-search input[type="search"]::-webkit-search-results-decoration{
  border-radius: 6px;
   -webkit-appearance: none;
  border: 1px solid rgba(255,255,255,.35);
   display: none;
   background: rgba(0,0,0,.12);
   color: #fff;
}
}


/* Autofill quirks */
/* If Timeless wraps input, keep it neat */
body.skin-timeless #p-search input#searchInput:-webkit-autofill,
body.skin-timeless #p-search #simpleSearch,
body.skin-timeless #p-search input#searchInput:-webkit-autofill:hover,
body.skin-timeless #p-search #searchInput-container{
body.skin-timeless #p-search input#searchInput:-webkit-autofill:focus{
  background: transparent !important;
   -webkit-text-fill-color: #fff !important;
   border: 0 !important;
   transition: background-color 9999s ease-in-out 0s;
   box-shadow: none !important;
}
}


/* Make the search label (if visible) subtle/white */
body.skin-timeless #p-search label{
  color: rgba(255,255,255,.92) !important;
}


/* =========================================================
/* ---------------------------------------------------------
   Timeless footer – site-like, full width
   4) FOOTER: keep full width, adopt palette
   ========================================================= */
   --------------------------------------------------------- */


body.skin-timeless #mw-footer-container{
body.skin-timeless #mw-footer-container{
  background: var(--bhc-paper);
   border-top: 6px solid var(--bhc-sand);
   border-top: 6px solid var(--bhc-sand);
  background: #f6f6f6;
}
}


body.skin-timeless #mw-footer{
body.skin-timeless #mw-footer{
  font-family: var(--bhc-body-font);
   color: #222;
   color: #222;
  font-family: var(--bhc-body-font);
}
/* Tidy footer link lists */
body.skin-timeless #mw-footer a{
  color: var(--bhc-link);
}
}


body.skin-timeless #mw-footer a:hover{
/* ---------------------------------------------------------
  text-decoration: underline;
  5) Spacing: ensure content doesn’t jam up under the header
}
  (header is now taller due to logo + strapline + search)
  --------------------------------------------------------- */


/* Slightly calmer footer text */
body.skin-timeless #mw-content-container{
body.skin-timeless #mw-footer,
   padding-top: 1.0rem;
body.skin-timeless #mw-footer *{
  font-size: 0.95rem;
  line-height: 1.6;
}
 
 
/* =========================================================
  Minor “site feel” extras (safe CSS-only)
  ========================================================= */
 
/* Make content area feel less cramped */
body.skin-timeless #content{
   padding-top: .25rem;
}
 
/* Optional: soften boxes a touch */
body.skin-timeless .toc,
body.skin-timeless #toc{
  border-radius: var(--bhc-radius);
}
}

Revision as of 15:32, 24 January 2026

/* All CSS here will be loaded for users of the Timeless skin */
/* =========================================================
   Bellingham Heritage Centre – Timeless skin branding
   CSS-only approach (no PHP/JS)
   Applies ONLY when the Timeless skin is in use.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Condensed:wght@400;700&family=Satisfy&display=swap');

body.skin-timeless{
  /* Palette */
  --bhc-teal: rgb(130,156,149);
  --bhc-olive: rgb(165,174,121);
  --bhc-sand: rgb(228,186,149);
  --bhc-maroon: #800020;
  --bhc-link: #005DB3;
  --bhc-text: #202020;

  /* Fonts */
  --bhc-body-font: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --bhc-heading-font: "Roboto Condensed", "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --bhc-accent-font: "Satisfy", cursive;

  /* Readability */
  font-size: 18px;
  line-height: 1.65;

  overflow-x: hidden;
}

@media (max-width: 720px){
  body.skin-timeless{ font-size: 16.5px; }
}

/* ---------------------------------------------------------
   Global typography (content)
   --------------------------------------------------------- */

body.skin-timeless,
body.skin-timeless .mw-body,
body.skin-timeless .mw-parser-output{
  font-family: var(--bhc-body-font);
  color: var(--bhc-text);
}

body.skin-timeless a{ color: var(--bhc-link); }
body.skin-timeless a:hover{ text-decoration: underline; }

body.skin-timeless .mw-parser-output h1,
body.skin-timeless .mw-parser-output h2,
body.skin-timeless .mw-parser-output h3{
  font-family: var(--bhc-heading-font);
  letter-spacing: .02em;
  color: var(--bhc-maroon);
}

body.skin-timeless .mw-parser-output h1{
  font-size: 2.05rem;
  line-height: 1.15;
  margin: 0.25rem 0 0.75rem;
  font-weight: 700;
}

body.skin-timeless .mw-parser-output h2{
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 1.6rem 0 0.6rem;
  border-bottom: 3px solid var(--bhc-sand);
  padding-bottom: .25rem;
}

body.skin-timeless .mw-parser-output h3{
  font-size: 1.25rem;
  line-height: 1.25;
  margin: 1.2rem 0 0.45rem;
}

body.skin-timeless .mw-parser-output h4{
  font-size: 1.1rem;
  line-height: 1.3;
}

body.skin-timeless .mw-parser-output p{ margin: 0.75rem 0; }

body.skin-timeless .mw-parser-output ul,
body.skin-timeless .mw-parser-output ol{ margin: 0.6rem 0 0.9rem 1.25rem; }

body.skin-timeless .mw-parser-output li{ margin: 0.2rem 0; }

body.skin-timeless #toc,
body.skin-timeless .toc,
body.skin-timeless .mw-normal-catlinks,
body.skin-timeless .catlinks,
body.skin-timeless .mw-editsection,
body.skin-timeless .mw-editsection a,
body.skin-timeless .mw-changeslist,
body.skin-timeless .mw-footer{
  font-size: 0.95rem;
}

/* Optional accent class you can use in wiki content */
body.skin-timeless .bhc-script{ font-family: var(--bhc-accent-font); }

/* ---------------------------------------------------------
   HEADER: make Timeless header full-width + BHC palette
   --------------------------------------------------------- */

/* The overall header bar */
body.skin-timeless #mw-header-container{
  background: var(--bhc-teal) !important;
  border-top: 5px solid var(--bhc-olive) !important;
  border-bottom: 10px solid var(--bhc-sand) !important;
}

/* Ensure header content can host an absolutely-positioned strapline */
body.skin-timeless #mw-header{
  position: relative;
  padding-top: 8px;
  padding-bottom: 18px; /* breathing room below header */
}

/* Make header text white by default */
body.skin-timeless #mw-header,
body.skin-timeless #mw-header a{
  color: #fff !important;
}

/* ---------------------------------------------------------
   1) SITE TITLE + LOGO: keep title visible, add logo at left
   Timeless uses: #p-logo-text a#p-banner
   --------------------------------------------------------- */

body.skin-timeless #p-logo-text{
  position: relative;
}

/* Show the title text, and make room for a logo to the left */
body.skin-timeless #p-logo-text #p-banner{
  display: inline-block;
  font-family: var(--bhc-heading-font) !important;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: .02em;
  text-decoration: none;

  /* Logo */
  background-image: url(/resources/assets/BHClogo.jpg);
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 56px 56px;

  /* Space for logo + a little gap */
  padding-left: 72px;
  min-height: 56px;
  line-height: 56px; /* vertically align title with logo */
}

/* Remove/Hide Timeless sidebar logo so we don’t double-brand */
body.skin-timeless #mw-site-navigation #p-logo{
  display: none !important;
}

/* ---------------------------------------------------------
   2) STRAPLINE (Option A): reuse #siteSub and position it in header
   Timeless normally shows this under the page title.
   We visually move it into the header under the site title.
   --------------------------------------------------------- */

/* Keep it available in DOM, but position it where we want */
body.skin-timeless #siteSub{
  position: absolute;
  /* Align under the site title text start (same padding-left as #p-banner) */
  left: calc(56px + 16px); /* 56 logo + 16 gap = 72px */
  top: 54px;               /* sits under the site title */
  margin: 0;
  padding: 0;

  font-family: var(--bhc-body-font);
  font-size: 1.0rem;
  line-height: 1.25;
  font-style: normal;
  color: rgba(255,255,255,.92) !important;

  /* Make sure it appears above other header bits */
  z-index: 2;
  pointer-events: none; /* avoid odd selection/overlap issues */
}

/* Prevent #siteSub reserving visible space in the content area */
body.skin-timeless #bodyContentOuter #siteSub{
  height: 0;
  overflow: visible; /* still allows it to render in header */
}

/* ---------------------------------------------------------
   3) SEARCH: smaller, right-aligned, white background + dark text
   Timeless uses: #p-search #searchInput
   --------------------------------------------------------- */

body.skin-timeless #p-search{
  margin-left: auto;
}

/* The input itself */
body.skin-timeless #p-search input[type="search"],
body.skin-timeless #p-search #searchInput{
  width: min(360px, 34vw);
  max-width: 100%;

  padding: .45rem .7rem;
  border-radius: 6px;

  background: #fff !important;      /* per your request */
  color: #202020 !important;        /* readable on white */
  caret-color: #202020 !important;

  border: 1px solid rgba(0,0,0,.15) !important;
  box-shadow: none !important;

  /* Remove browser “search field” styling that adds odd internal UI */
  -webkit-appearance: none;
  appearance: none;
}

/* Placeholder */
body.skin-timeless #p-search input[type="search"]::placeholder,
body.skin-timeless #p-search #searchInput::placeholder{
  color: rgba(0,0,0,.55) !important;
}

/* Remove the internal “X / decorations” in WebKit search fields */
body.skin-timeless #p-search input[type="search"]::-webkit-search-decoration,
body.skin-timeless #p-search input[type="search"]::-webkit-search-cancel-button,
body.skin-timeless #p-search input[type="search"]::-webkit-search-results-button,
body.skin-timeless #p-search input[type="search"]::-webkit-search-results-decoration{
  -webkit-appearance: none;
  display: none;
}

/* If Timeless wraps input, keep it neat */
body.skin-timeless #p-search #simpleSearch,
body.skin-timeless #p-search #searchInput-container{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Make the search label (if visible) subtle/white */
body.skin-timeless #p-search label{
  color: rgba(255,255,255,.92) !important;
}

/* ---------------------------------------------------------
   4) FOOTER: keep full width, adopt palette
   --------------------------------------------------------- */

body.skin-timeless #mw-footer-container{
  border-top: 6px solid var(--bhc-sand);
  background: #f6f6f6;
}

body.skin-timeless #mw-footer{
  font-family: var(--bhc-body-font);
  color: #222;
}

/* ---------------------------------------------------------
   5) Spacing: ensure content doesn’t jam up under the header
   (header is now taller due to logo + strapline + search)
   --------------------------------------------------------- */

body.skin-timeless #mw-content-container{
  padding-top: 1.0rem;
}