Repository navigation
A portfolio on Tailwind v4 and Astro, scaled from one design baseline per breakpoint #20771
shahid0
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I rebuilt my portfolio with Tailwind CSS v4 and Astro: https://shahidhussain.dev
A few things that worked well with v4, in case they help someone:
One design baseline per breakpoint. The Figma file is drawn at 390 (phone), 834 (tablet) and 1440 (desktop). Every size in the stylesheet is rem, the
@themetokens mirror the Figma variables, and the root font size scales within each range, so every phone shows the 390 layout with the same line breaks:The vw value is 1600 ÷ the baseline width, so 1rem is 16px at each baseline. Clamps in rem keep the browser's font-size setting working.
Scroll-linked line drawings in plain CSS. The figures are generated SVG line art; every stroke has
pathLength="1"and draws in on aview()timeline. One gotcha: write it as longhands (animation-name,animation-timeline,animation-range). The minifier folds a timeline set next to theanimationshorthand into it, and browsers then drop the whole declaration.FAQ answers that open in place without JavaScript: native
<details>, animated with::details-contentandinterpolate-size: allow-keywords.No UI framework in the browser. The only heavy script is the three.js hero, loaded after the page is on screen.
Lighthouse on a phone: 99 on the home page, 100 on the inner pages. Happy to answer questions about any of it.
All reactions