MediaWiki:Gadget-wix-nav.css

Revision as of 21:08, 31 March 2026 by Wikilah admin (talk | contribs) (Created page with "/* ================================================================ WIX-NAV.CSS — Wiki Interactive Experience: Training Navigation ================================================================ Loaded via ResourceLoader alongside wix-nav.js. Depends on design tokens defined in wix-core.css. Provides a horizontal navigation bar for multi-page training programs. Auto-highlights the current page. ====================================================...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* ================================================================
   WIX-NAV.CSS — Wiki Interactive Experience: Training Navigation
   ================================================================
   Loaded via ResourceLoader alongside wix-nav.js.
   Depends on design tokens defined in wix-core.css.

   Provides a horizontal navigation bar for multi-page training
   programs. Auto-highlights the current page.
   ================================================================ */


/* ── 1. Menu Container ───────────────────────────────────────────
   Horizontal scrollable row of nav buttons.
   ──────────────────────────────────────────────────────────────── */

.wix-menu {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
}

.wix-menu::-webkit-scrollbar {
  display: none;
}


/* ── 2. Nav Buttons ──────────────────────────────────────────────
   Each page in the training program is a button.
   Non-current pages are <a> links; current page is a <span>.
   ──────────────────────────────────────────────────────────────── */

.wix-menu-btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0.45rem 1rem;
  border: 1px solid var(--wix-border);
  border-radius: var(--wix-radius);
  background: var(--wix-bg);
  color: var(--wix-text);
  font-size: 0.85em;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    border-color var(--wix-transition),
    background   var(--wix-transition);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.wix-menu-btn:hover {
  border-color: var(--wix-accent);
  background: var(--wix-accent-light);
  text-decoration: none;
  color: var(--wix-text);
}


/* ── 3. Current Page ─────────────────────────────────────────────
   Highlighted button for the page the user is currently on.
   ──────────────────────────────────────────────────────────────── */

.wix-menu-btn--current {
  background: var(--wix-accent);
  border-color: var(--wix-accent);
  color: #fff;
  cursor: default;
}

.wix-menu-btn--current:hover {
  background: var(--wix-accent);
  border-color: var(--wix-accent);
  color: #fff;
}


/* ── 4. Mobile Adjustments ───────────────────────────────────────
   Tighter padding on narrow screens.
   ──────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  .wix-menu-btn {
    padding: 0.4rem 0.75rem;
  }
}