Zafar (@zafartalks) header
Zafar (@zafartalks) profile picture

Helping SaaS founders & startups build fast, modern websites that convert visitors into customers.

Europe (Remote)
Joined October 2020
Photo by Zafar (@zafartalks)Photo by Zafar (@zafartalks)Photo by Zafar (@zafartalks)Photo by Zafar (@zafartalks)Photo by Zafar (@zafartalks)Photo by Zafar (@zafartalks)Photo by Zafar (@zafartalks)Photo by Zafar (@zafartalks)Photo by Zafar (@zafartalks)Photo by Zafar (@zafartalks)
Made final changes to my portfolio website. πŸ‘‰πŸ» Hero background color with updated heading. πŸ‘‰πŸ» Added Blog page for discoverability. πŸ‘‰πŸ» Sticky about section. πŸ‘‰πŸ» Development process timeline. Link in Bio.
101
β€œpattern” attribute can be used without required”required” attribute but it is ignored on input type β€œnumber”.
html tip πŸ”’: zip codes, card numbers and one-time codes are text fields with a number keypad. <πš’πš—πš™πšžπš πšπš’πš™πšŽ="𝚝𝚎𝚑𝚝" πš’πš—πš™πšžπšπš–πš˜πšπšŽ="πš—πšžπš–πšŽπš›πš’πšŒ" πš™πšŠπšπšπšŽπš›πš—="[𝟢-𝟿]{𝟻}" πšŠπšžπšπš˜πšŒπš˜πš–πš™πš•πšŽπšπšŽ="πš™πš˜πšœπšπšŠπš•-𝚌𝚘𝚍𝚎"> πšπš’πš™πšŽ="πš—πšžπš–πš‹πšŽπš›" is a πšœπš™πš’πš—πš‹πšžπšπšπš˜πš—. arrow down on "𝟢𝟸𝟷𝟹𝟿" gives "𝟸𝟷𝟹𝟾" and the leading zero is gone.
1
13
Drag, in Reactive CSS: .card { --x: state(0px); --y: state(0px); translate: var(--x) var(--y); touch-action: none; } .card:on(drag) { --x: set(event(x)); --y: set(event(y)); } event(x) continues from where the card stopped reactivecss.com
3
20
3
135
5,360
And at times your cards might end up with different heights & meta section of the card might look misaligned. To fix that: .card { display:flex; flex-direction:column; .meta{margin-top:auto;} }
CSS tip: cut long titles after 2 lines with a clean "…". .card-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; } Works in every modern browser, Firefox included, despite the -webkit- prefix.
1
15
Tailwind & HTML tags attributes work differently but they both introduce one common issue which is readability. First libs & frameworks were introduced to follow to avoid using many css class names & html attributes 🧡
Replying to @calebporzio @Apply
Tailwind became popular to help you hand-write your CSS into pages. We are trending away from hand writing the CSS ... so I'm expecting us to be trending away from Tailwind embedded CSS. Personally, I ask my agents to move the tailwind CSS out of the pages and back into css files with nested CSS structure. Most of my Tailwind is being used with @apply directives.
1
15
Then it was realized that several css classnames & attributes were the right way to so libs & frameworks were introduced to bring that pattern back in practice.
2
Tiny but effective.
Design engineering tip: always check edge cases Let a long word wrap overflow-wrap: anywhere
1
1
43
Layout Reflow & layout recalculations are a few bottlenecks & performance issues linked to β€œdvh”. Relying on static units such as svh & lvh while using dvh where it is needed would be a better approach.
Design engineering tip: 100vh is not always best choice Size the screen by what is showing height: 100dvh
23
Never used audio & video elements that html5 offer out of the box but that looks promising.
Styling audio and video by state is now pure CSS. ✌🏻 `:playing`, `:paused`, `:muted`, `:seeking`, `:buffering`, `:stalled` and `:volume-locked` now work in every major engine: Chrome 158, Firefox 150, and Safari 15.4+. No event listeners, no class toggling. Before this… Now ‡️
1
24
Design Engineering: Might not be accomplished with β€œgap” property with hard coded value. gap with clamp() or progress() or margin property would do it.
Design tip: a card's title belongs with its description, not with the image above it.
15
Nextjs Link component is already optimized enough I think this one is over-think component.
Use Fast Link and your links start navigating on press, not on release. That small gap between pressing and releasing the mouse is free time for the next page to load. πš—πš™πš– πš’πš—πšœπšπšŠπš•πš• @𝚏𝚊𝚜𝚝-πš•πš’πš—πš”/πš—πšŽπš‘πš github.com/vercel-labs/fast-…
24
Exploring an awesome looking portfolio website.
39
Way better than forms npm packages such as Formik which listens to each key release. One of the performance bottlenecks solved by CSS.
CSS tip: stop showing form errors before the user has typed anything. input:user-invalid { border-color: red; } :invalid turns fields red the moment the page loads. :user-invalid waits until the user has actually interacted with the field. Works in all major browsers.
1
18
In short inner-radius = parent-border-radius - parent-padding.
Design engineering tip: your inner corners bulge out of the card Inner radius is outer minus padding border-radius: calc(28px - 10px)
13
Git habits that make AI coding agents safe to use: πŸ’Ύ Commit before every agent task 🌿 One branch per feature 🧩 Small commits you can revert on their own πŸ” Read the full diff before committing πŸ—‚οΈ Stage files on purpose, not git add . 🚫 Keep .env and secrets in .gitignore πŸ§ͺ Run the tests before every commit πŸ”™ Stash and retry when a direction feels wrong 🌳 Use worktrees to run agents in parallel πŸ“ Make commit messages explain the why Git is your undo button.
22
7
64
5,480
Design Engineering Tip: Use tabular numbers for ticking timers. Proportional digits shift in width on every update. .timer { font-variant-numeric: tabular-nums; }
7
10
2
201
6,156
WIP on Travel Agency website. Here is a β€œFAQ & Footer section”. Do you need to build your website? πŸ‘‰πŸ» Link in Bio to book a free call.
WIP on Travel Agency website. Here is a β€œCustomer Reviews section”. Do you need to build your website? πŸ‘‰πŸ» Link in Bio to book a free call.
41
WIP on Travel Agency website. Here is a β€œCustomer Reviews section”. Do you need to build your website? πŸ‘‰πŸ» Link in Bio to book a free call.
WIP on Travel Agency website. Here is a β€œAbout Us section” exploration. Do you need to build your website? πŸ‘‰πŸ» Link in comments to book a free call.
1
1
58
Might not be a big deal on chrome+MacOS but certainly on windows+other browsers.
CSS tip: Use scrollbar-gutter to avoid layout shifts when a scrollbar appears. The browser keeps room for the scrollbar even when there's nothing to scroll, so content doesn't shift when it shows up.
1
35
WIP on Travel Agency website. Here is a β€œAbout Us section” exploration. Do you need to build your website? πŸ‘‰πŸ» Link in comments to book a free call.
Working on Travel Agency website. Here is a β€œHow it Works section” exploration. Do you need to build your website? πŸ‘‰πŸ» Link in comments to book a free call.
1
1
1
61