Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions components/utilities/versionSelector.module.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
.Container {
@apply flex items-center gap-2 mb-4;
@apply flex items-center gap-2 mb-4 z-dropdown;
/* Sticky positioning - stays in place as you scroll */
position: sticky;
top: 0.5rem;
z-index: 50; /* See z-index reference in styles/globals.css */
width: fit-content;
align-self: flex-start;
}
Expand Down Expand Up @@ -66,7 +65,7 @@

/* Dropdown menu - solid background matching site */
.DropdownMenu {
@apply absolute top-full left-0 mt-1 rounded-md list-none m-0 min-w-full z-50;
@apply absolute top-full left-0 mt-1 rounded-md list-none m-0 min-w-full z-dropdown;
@apply bg-white border-none;
padding: 0.375rem 0;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
Expand Down
30 changes: 14 additions & 16 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,25 @@
* ==========================================================================
* Z-INDEX REFERENCE
* ==========================================================================
* Use this scale to maintain consistent stacking order across the site.
* When adding new z-index values, update this reference.
* Semantic z-index classes are defined in tailwind.config.js under theme.extend.zIndex
* Use these class names instead of numeric values (z-10, z-20, etc.)
*
* z-50 - Version selector (sticky container & dropdown menu)
* - Theme toggle tooltip
* z-dropdown (50) - Version selector, tooltips, dropdown menus
* Files: versionSelector.module.css, themeToggle.module.css
*
* z-30 - Header navigation (header.module.css)
* - Image lightbox overlay (image.module.css)
* - Chat sticky button (chatSticky.module.css)
* z-header (30) - Header navigation, overlays, sticky elements
* Files: header.module.css, image.module.css, chatSticky.module.css
*
* z-20 - Sidebar navigation (sideBar.module.css)
* - Image lightbox close button (image.module.css)
* - RefCard containers (refCard.module.css)
* z-sidebar (20) - Sidebar, refcards, secondary overlays
* Files: sideBar.module.css, image.module.css, refCard.module.css
*
* z-10 - Code block elements (code.module.css, autofunction.module.css)
* - Search modal & search box (search.module.css, searchModal.css)
* - Floating nav & gradients (floatingNav.module.css, sideBar.module.css)
* - Nav icons (navChild.module.css)
* - Component slider elements (componentSlider.module.css)
* z-elevated (10) - Code blocks, search, floating nav, nav icons
* Files: code.module.css, autofunction.module.css, search.module.css,
* floatingNav.module.css, navChild.module.css, componentSlider.module.css
*
* z-0 - Line highlights in code blocks (base layer)
* z-base (0) - Default layer, code line highlights
*
* z-modal (100) - Reserved for modals and dialogs (future use)
* ==========================================================================
*/

Expand Down
11 changes: 11 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,17 @@ module.exports = {
},

extend: {
// Semantic z-index scale for consistent stacking order
// See styles/globals.css for usage documentation
zIndex: {
base: "0", // Default layer, code line highlights
elevated: "10", // Code blocks, search, floating nav, nav icons
sidebar: "20", // Sidebar, refcards, lightbox close button
header: "30", // Header, lightbox overlay, chat sticky
dropdown: "50", // Version selector, tooltips, dropdown menus
modal: "100", // Modals, dialogs (reserved for future use)
},

minWidth: {
56: "14rem",
},
Expand Down