Hanan Khan (@HananMufti) header
Hanan Khan (@HananMufti) profile picture
Schweiz
Joined October 2011
Photo by Hanan Khan (@HananMufti)Photo by Hanan Khan (@HananMufti)Photo by Hanan Khan (@HananMufti)Photo by Hanan Khan (@HananMufti)Photo by Hanan Khan (@HananMufti)Photo by Hanan Khan (@HananMufti)Photo by Hanan Khan (@HananMufti)Photo by Hanan Khan (@HananMufti)Photo by Hanan Khan (@HananMufti)Photo by Hanan Khan (@HananMufti)
Native <img> lazy-loading is coming to the web! https://xitter.gq/t.co/LgF7F1iMgR <img loading=lazy> defers offscreen images until the user scrolls near them. Shipping in Chrome ~75 https://xitter.gq/t.co/4gR7lvx4zx
252
6,471
680
17,252
url.searchParams is so nice for getting/setting query string params.
32
634
26
3,538
I didn't know this existed.🙈 `image-set` in CSS. #devsheets 🔗MDN: developer.mozilla.org/en-US/… 🔗Specification: drafts.csswg.org/css-images-… Video alt: Usage of CSS `image-set`. Browser support is not great but PostCSS offers a nice way to transform `image-set` into media queries.
15
302
17
1,071
Tip: Replace large animated GIFs with <video> for faster page loads: https://xitter.gq/t.co/jVxtx4KEIS. A lot of sites (Google blogs included) could shave 80-90% off the size of these downloads by doing this.
18
262
10
1,014
TIL the CSS "-webkit-line-clamp" property truncates multi-line text: https://xitter.gq/t.co/T4yMoYSgrS. It's supported in Chromium, Firefox and Safari! https://xitter.gq/t.co/B13EU3Hu3n
35
1,134
90
4,949
A very cool example of how React Query guts your "server-state" from your global state manager and drops LOCs like crazy. This example entirely removed multiple action creator and reducer files in exchange for a few `useQuery()` instances. github.com/psmb/calendar/com…
1
9
31
I'm almost ashamed to admit this, but I just used optional chaining (.?) and nullish coalescing (??) for the first time just now and WOW THAT IS AWESOME.
29
39
6
534
"Your UI doesn't need to map one-to-one with your data's fields and values". Great thinking on simplicity from @steveschoger
34
1,110
35
5,993
Lots of what we call "Application State" is actually just a client-side cache of server state. And just with any cache, invalidation is a hard problem. Interestingly, I don't think many apps really consider this, but it's pretty important. 1/
31
93
13
697
CSS prefers-reduced-motion is great for *limiting* animations if a user sets this preference in their OS: https://xitter.gq/t.co/qtKaOwIqNO & https://xitter.gq/t.co/ZSHT9HST9J
4
166
4
764
Hanan Khan retweeted
Want to hides your secrets in environment files? Cloak for VS @code helps you avoid accidentally sharing them with everyone who sees your screen. Alpha is released! marketplace.visualstudio.com… - Create a VS Code ext code.visualstudio.com/api/ge… - Extension API code.visualstudio.com/api/re…
6
136
10
453
"If your code has to be rewritten to be fixed, improved, or extended, you failed!" This statement by @getify is amazing! It lets you think more critically on how to make your code readable, maintainable and most important understandable!
2
The HTML & CSS Security Checklist | Sqreen sqreen.com/checklists/html-c… via @SqreenIO
Rainy #Islamabad 🌧 🌲
20
61
5
627
#PakistanIs something different :) Foam everywhere...in a place called #Gokina near @Islaamabad #Islamabad #Pakistan