MediaWiki:Gadget-wix-nav.css
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;
}
}
/* ================================================================
DROPDOWN VARIANT — data-wix-module="nav-dropdown"
Full-width toggle button that opens a panel of page links.
================================================================ */
/* ── 5. Dropdown Wrapper ─────────────────────────────────────────
Positioning context for the panel.
──────────────────────────────────────────────────────────────── */
.wix-dropdown {
position: relative;
width: 100%;
margin-bottom: 1rem;
}
/* ── 6. Toggle Button ────────────────────────────────────────────
Full-width button showing the current page label + chevron.
──────────────────────────────────────────────────────────────── */
.wix-dropdown-toggle {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
padding: 0.6rem 1rem;
border: 1px solid var(--wix-border);
border-radius: var(--wix-radius);
background: var(--wix-bg);
color: var(--wix-text);
font: inherit;
font-size: 0.85em;
font-weight: 600;
color: inherit;
cursor: pointer;
transition:
border-color var(--wix-transition),
background var(--wix-transition);
-webkit-tap-highlight-color: transparent;
}
.wix-dropdown-toggle:hover {
border-color: var(--wix-accent);
background: var(--wix-accent-light);
}
.wix-dropdown-chevron {
margin-left: 0.5rem;
transition: transform var(--wix-transition);
flex-shrink: 0;
font-size: 0.85em;
color: var(--wix-text-muted);
}
.wix-dropdown-toggle--open .wix-dropdown-chevron {
transform: rotate(180deg);
}
/* ── 7. Dropdown Panel ───────────────────────────────────────────
List of page links, absolutely positioned below the toggle.
──────────────────────────────────────────────────────────────── */
.wix-dropdown-panel {
display: none;
position: absolute;
top: 100%;
left: 0;
right: 0;
margin-top: 2px;
border: 1px solid var(--wix-border);
border-radius: var(--wix-radius);
background: var(--wix-bg);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
z-index: 100;
overflow: hidden;
}
.wix-dropdown-panel--open {
display: block;
animation: wixFadeIn 0.15s ease;
}
/* ── 8. Dropdown Items ───────────────────────────────────────────
Each page in the list.
──────────────────────────────────────────────────────────────── */
.wix-dropdown-item {
display: block;
width: 100%;
padding: 0.55rem 1rem;
color: var(--wix-text);
font-size: 0.85em;
font-weight: 600;
text-decoration: none;
transition:
background var(--wix-transition);
cursor: pointer;
}
.wix-dropdown-item:hover {
background: var(--wix-accent-light);
text-decoration: none;
color: var(--wix-text);
}
.wix-dropdown-item + .wix-dropdown-item {
border-top: 1px solid var(--wix-border-subtle);
}
.wix-dropdown-item--current {
background: var(--wix-accent);
color: #fff;
cursor: default;
}
.wix-dropdown-item--current:hover {
background: var(--wix-accent);
color: #fff;
}
/* ================================================================
NAV CARDS — data-wix-module="nav-cards"
Grid of clickable cards linking to sub-homepages.
Each card has an icon, label, description, and arrow.
================================================================ */
/* ── 9. Card Grid ───────────────────────────────────────────────
Responsive grid: 1 col mobile, 2 col tablet, 3 col desktop.
──────────────────────────────────────────────────────────────── */
.wix-nav-cards {
width: 100%;
display: grid;
grid-template-columns: 1fr;
gap: 12px;
}
@media (min-width: 520px) {
.wix-nav-cards {
grid-template-columns: repeat(2, 1fr);
gap: 14px;
}
}
@media (min-width: 900px) {
.wix-nav-cards {
grid-template-columns: repeat(3, 1fr);
}
}
/* ── 10. Card ───────────────────────────────────────────────────
Clickable row with icon, text, and arrow.
──────────────────────────────────────────────────────────────── */
.wix-nav-card {
display: flex;
align-items: center;
gap: 14px;
background: var(--wix-bg);
border: 1.5px solid var(--wix-border);
border-radius: 12px;
padding: 14px 16px;
cursor: pointer;
transition:
border-color 0.2s ease,
box-shadow 0.2s ease,
transform 0.2s ease;
user-select: none;
-webkit-user-select: none;
-webkit-tap-highlight-color: transparent;
color: var(--wix-text);
text-decoration: none;
}
.wix-nav-card:hover {
border-color: var(--wix-accent-light);
box-shadow: 0 2px 10px rgba(26, 82, 118, 0.08);
transform: translateY(-1px);
text-decoration: none;
color: var(--wix-text);
}
.wix-nav-card:active {
transform: scale(0.98);
box-shadow: none;
}
/* ── 11. Card Icon ──────────────────────────────────────────────
Rounded square with centered SVG icon.
──────────────────────────────────────────────────────────────── */
.wix-nav-card-ico {
width: 42px;
height: 42px;
flex-shrink: 0;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
background: var(--wix-bg-subtle);
color: var(--wix-text-muted);
transition:
background 0.2s ease,
color 0.2s ease;
}
.wix-nav-card:hover .wix-nav-card-ico {
background: var(--wix-accent);
color: #fff;
}
.wix-nav-card-ico svg {
width: 22px;
height: 22px;
}
/* ── 12. Card Text ──────────────────────────────────────────────
Label + description.
──────────────────────────────────────────────────────────────── */
.wix-nav-card-txt {
flex: 1;
min-width: 0;
}
.wix-nav-card-name {
font-size: 1em;
font-weight: 600;
letter-spacing: -0.1px;
line-height: 1.2;
}
.wix-nav-card-desc {
font-size: 0.85em;
color: var(--wix-text-muted);
margin-top: 2px;
}
/* ── 13. Card Arrow ─────────────────────────────────────────────
Right-pointing chevron, slides on hover.
──────────────────────────────────────────────────────────────── */
.wix-nav-card-arrow {
color: var(--wix-border);
display: flex;
align-items: center;
flex-shrink: 0;
transition:
color 0.2s ease,
transform 0.2s ease;
}
.wix-nav-card:hover .wix-nav-card-arrow {
color: var(--wix-accent);
transform: translateX(2px);
}
.wix-nav-card-arrow svg {
width: 14px;
height: 14px;
}
/* ── 14. Card Entrance Animation ────────────────────────────────
Staggered fade-in for up to 12 cards.
──────────────────────────────────────────────────────────────── */
.wix-nav-card {
animation: wixFadeIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}
.wix-nav-card:nth-child(1) { animation-delay: 0.02s; }
.wix-nav-card:nth-child(2) { animation-delay: 0.05s; }
.wix-nav-card:nth-child(3) { animation-delay: 0.08s; }
.wix-nav-card:nth-child(4) { animation-delay: 0.11s; }
.wix-nav-card:nth-child(5) { animation-delay: 0.14s; }
.wix-nav-card:nth-child(6) { animation-delay: 0.17s; }
.wix-nav-card:nth-child(7) { animation-delay: 0.20s; }
.wix-nav-card:nth-child(8) { animation-delay: 0.23s; }
.wix-nav-card:nth-child(9) { animation-delay: 0.26s; }
.wix-nav-card:nth-child(10) { animation-delay: 0.29s; }
.wix-nav-card:nth-child(11) { animation-delay: 0.32s; }
.wix-nav-card:nth-child(12) { animation-delay: 0.35s; }