UI Fixes for Mobile

This commit is contained in:
2026-03-08 16:27:40 -04:00
parent 74a1b264b1
commit f0da6ddbcc
3 changed files with 25 additions and 7 deletions

View File

@@ -862,6 +862,8 @@ const CONDITIONAL_TOGGLES = [
];
function applyConditionalVisibility(container) {
const tab = TABS.find((t) => t.id === currentTab);
CONDITIONAL_TOGGLES.forEach((group) => {
const toggleRow = container.querySelector(
`.row.setting[data-setting="${group.toggle}"]`
@@ -873,12 +875,17 @@ function applyConditionalVisibility(container) {
group.whenOff.forEach((name) => {
const row = container.querySelector(`.row.setting[data-setting="${name}"]`);
if (row) row.classList.toggle("cl-tab-hidden", isOn);
if (!row) return;
// Only unhide if this setting belongs to the current tab
const inTab = tab && tab.settings.has(name);
row.classList.toggle("cl-tab-hidden", !inTab || isOn);
});
group.whenOn.forEach((name) => {
const row = container.querySelector(`.row.setting[data-setting="${name}"]`);
if (row) row.classList.toggle("cl-tab-hidden", !isOn);
if (!row) return;
const inTab = tab && tab.settings.has(name);
row.classList.toggle("cl-tab-hidden", !inTab || !isOn);
});
});

View File

@@ -128,7 +128,10 @@
/* ── Smooth Scroll ── */
html {
scroll-behavior: smooth;
overflow-x: hidden;
}
html, .cl-body {
max-width: 100vw;
}
/* ── Focus-visible Accessibility ── */
@@ -543,13 +546,17 @@ html {
.cl-navbar__mobile-menu {
display: none;
position: fixed;
inset: 0;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
height: 100dvh;
background: var(--cl-bg);
flex-direction: column;
align-items: center;
justify-content: center;
gap: 1.25rem;
z-index: 1000;
z-index: 999;
}
.cl-navbar__mobile-menu.open {
@@ -2143,6 +2150,10 @@ html {
MOBILE — tighter padding, no horizontal overflow
═══════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
.cl-orb-container {
display: none;
}
.cl-container {
padding: 0 1rem;
}