Awesome! @css_doodle
Hanan Khan retweeted
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
Hanan Khan retweeted
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.
Hanan Khan retweeted
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.
Grab and customize yourself a web gradient! #css #gradients #webdesign #webdevelopment grabient.com via @unfoldco
Hanan Khan retweeted
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
Truncate multi-line text in CSS
Hanan Khan retweeted
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…
Hanan Khan retweeted
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.
Hanan Khan retweeted
"Your UI doesn't need to map one-to-one with your data's fields and values". Great thinking on simplicity from @steveschoger
Hanan Khan retweeted
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/
Hanan Khan retweeted
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
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…
Hanan Khan retweeted
Snowpack: developing web apps without bundling @pikapkg
snowpack.dev ^ar
"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
Easy, readable and dynamic decorator for UILabels #SwiftLang #NSAttributedString github.com/dimpiax/StyleDeco…
2
1
#PakistanIs something different :) Foam everywhere...in a place called #Gokina near @Islaamabad #Islamabad #Pakistan
















