Fix/css tweaks and bugs #11

Merged
ilia merged 13 commits from fix/css-tweaks-and-bugs into main 2026-07-14 15:19:16 +00:00
3 changed files with 13 additions and 6 deletions
Showing only changes of commit c3e8e38a58 - Show all commits
@@ -38,10 +38,12 @@ export function SectionAccordion({ number, title, id, isActive, href, children }
return ( return (
<section id={id} className="scroll-mt-8"> <section id={id} className="scroll-mt-8">
{isActive ? ( {isActive ? (
<div className="mb-6 sm:mb-12"> <div className="mb-section-gap">
<ViewTransitionWrapper name="section-title"> <ViewTransitionWrapper name="section-title">
<div className="mb-6 sm:mb-12"> <div className="mb-section-gap">
<h1 className="font-heading font-black text-xl sm:text-section-title leading-[1.2] mb-0">{heading}</h1> <h1 className="font-heading font-black text-xl sm:text-section-title leading-[1.2] mb-0 py-0.5">
{heading}
</h1>
</div> </div>
</ViewTransitionWrapper> </ViewTransitionWrapper>
<ViewTransitionWrapper name="section-body"> <ViewTransitionWrapper name="section-body">
@@ -52,9 +54,9 @@ export function SectionAccordion({ number, title, id, isActive, href, children }
<Link <Link
href={href} href={href}
aria-label={heading} aria-label={heading}
className="block w-full text-left mb-1 py-1 sm:mb-3 sm:py-3 group border-b-0 hover:border-b-0" className="block w-full text-left text-xl sm:text-nav-title py-0.5 group border-b-0 hover:border-b-0"
> >
<span className="block font-heading font-wonk font-black text-xl sm:text-3xl opacity-30 group-hover:opacity-60 transition-opacity duration-200"> <span className="block font-heading font-wonk font-black opacity-30 group-hover:opacity-60 transition-opacity duration-200">
{heading} {heading}
</span> </span>
</Link> </Link>
+5
View File
@@ -21,6 +21,8 @@
--font-weight-normal: 400; --font-weight-normal: 400;
--text-section-title: clamp(2rem, 7.5vw, 8rem); --text-section-title: clamp(2rem, 7.5vw, 8rem);
/* Half of the active title so the active/inactive size ratio holds at every width */
--text-nav-title: clamp(1.25rem, 3.75vw, 4rem);
/* === LINE HEIGHT === */ /* === LINE HEIGHT === */
--line-height-tight: 1.2; --line-height-tight: 1.2;
@@ -127,7 +129,10 @@
--container-section: var(--section-content-width); --container-section: var(--section-content-width);
--spacing-footer: 5rem; --spacing-footer: 5rem;
--spacing-footer-wide: 4rem; --spacing-footer-wide: 4rem;
/* Active-section vertical rhythm — fluid so it tracks the clamp() title instead of jumping at sm */
--spacing-section-gap: clamp(1.5rem, 5vw, 3.25rem);
--text-section-title: var(--text-section-title); --text-section-title: var(--text-section-title);
--text-nav-title: var(--text-nav-title);
--shadow-brutal-xs: var(--shadow-brutal-xs); --shadow-brutal-xs: var(--shadow-brutal-xs);
--shadow-brutal-sm: var(--shadow-brutal-sm); --shadow-brutal-sm: var(--shadow-brutal-sm);
@@ -28,7 +28,7 @@ export function SectionsAccordion({ sections, activeSlug, children }: Props) {
const slots = Children.toArray(children); const slots = Children.toArray(children);
return ( return (
<div className="space-y-0 sm:space-y-2"> <div>
{sections.map((section, i) => ( {sections.map((section, i) => (
<SectionAccordion <SectionAccordion
key={section.slug} key={section.slug}