collapse nav items on smaller screens

This commit is contained in:
Michael DiLeo
2025-08-14 14:41:40 -05:00
parent 77b43080a0
commit f316a049a6
4 changed files with 147 additions and 8 deletions

View File

@@ -51,7 +51,14 @@ async function createOptimizedBuild() {
'video-container',
'photo-gallery',
'photo-item',
'dark'
'dark',
// Responsive navigation classes
'desktop-nav',
'mobile-nav',
'dropdown',
// Button classes
'secondary',
'outline'
],
deep: [
/^--pico-/,
@@ -60,7 +67,12 @@ async function createOptimizedBuild() {
/:hover/,
/:focus/,
/:active/,
/:visited/
/:visited/,
// Dropdown and interactive states
/\[open\]/,
/\[role=/,
/details/,
/summary/
],
// Keep base typography selectors that are essential for proper font rendering
greedy: [
@@ -78,7 +90,14 @@ async function createOptimizedBuild() {
/^a$/,
/^a:/, // Add anchor pseudo-classes like a:hover, a:focus
/^a\./, // Add anchor with classes like a.secondary
/^a\[/ // Add anchor with attributes like a[role=button]
/^a\[/, // Add anchor with attributes like a[role=button]
// Dropdown and button elements
/^details$/,
/^summary$/,
/^button$/,
/^button:/,
/^button\./,
/^button\[/
]
},
variables: true,
@@ -239,7 +258,7 @@ async function bundleAndMinifyJS() {
hoist_vars: false,
if_return: true,
join_vars: true,
cascade: true,
side_effects: true
},
mangle: {