Twitter | Search | |
Benjamin Johnson
Front-end engineer. Learning each day one mistake at a time.
509
Tweets
176
Following
137
Followers
Tweets
Benjamin Johnson retweeted
Paul Irish Jun 11
Chrome Incognito mode has been detectable for years, due to the FileSystem API implementation. As of Chrome 76, this is fixed. Apologies to the "detect private mode" scripts out there. 💐
Reply Retweet Like
Benjamin Johnson Jun 4
Replying to @benjamminj
Oops, made a typo! it's actually .selector { width:100%; padding-top:75%; }
Reply Retweet Like
Benjamin Johnson Jun 4
Replying to @Swlockhorst
Big shoutout to for letting me dig thru his AspectRatio React component, I feel like I just unlocked a whole new world of CSS styling 🎉
Reply Retweet Like
Benjamin Johnson Jun 4
Replying to @benjamminj
Along with that, I'm learning how this behavior can be used to create responsive-width images that maintain their aspect ratio 🤯 For example, a 4:3 aspect ratio could be done like this .selector { width: 100%; height: 75%; }
Reply Retweet Like
Benjamin Johnson Jun 4
TIL: using a percentage for padding-top and padding-bottom in CSS is based on the WIDTH of the element, not the parent element's height.
Reply Retweet Like
Benjamin Johnson retweeted
David K. 🎹 May 30
⚛️ Did you know that React's useState hook is internally implemented as a reducer (basicStateReducer), just like useReducer? IMO it's helpful to consider: useReducer = default useState = simpler use-cases rather than: useState = default useReducer = more complex use-cases
Reply Retweet Like
Benjamin Johnson retweeted
donavon {...♥️} May 18
I just ordered some of these fun NASA/ parody stickers for my closest friends. Retweet for a chance to win. I'll select 5 RTs at random next Friday. (I'll also toss in some other stickers that I've designed.)
Reply Retweet Like
Benjamin Johnson retweeted
SourceStrike Apr 5
Can’t stop won’t stop hiring amazing engineers👌🏽shoutout to Edwin for being the biggest Dodger fan around ⚾️ you can always find him at the stadium, watching on TV, or listening on the…
Reply Retweet Like
Benjamin Johnson retweeted
SourceStrike Apr 4
Excited to welcome the sickest engineer around 🤘🏼 Steven is known doing amazing code while on the 🚊. Anybody else work while commuting? 👩🏻‍💻👨🏻‍💻 @ Irvine, California
Reply Retweet Like
Benjamin Johnson retweeted
David K. 🎹 Mar 27
Level of CSS skill required to... Style a new Bootstrap site: ■□□□□□□□□□ Style a website: ■■■□□□□□□□ Style an app: ■■■■■■□□□□ Style a legacy Bootstrap site: ■■■■■■■■■■■■■■■■■
Reply Retweet Like
Benjamin Johnson retweeted
Google Accessibility Mar 14
Coming later this year: Screen reader users can ask Chrome to get automatic image descriptions from Google when an image is missing alt text. Get a sneak preview now using Chrome Canary, just open the context menu!
Reply Retweet Like
Benjamin Johnson Mar 23
Replying to @jhoffmcd @kylemh_
I also had some success using deep snaps as a short-term refactoring tool for legacy code at my last job. Basically generate a ton of coverage, refactor with tests, and then replace with more focused long-term tests (actually editing a blog post on that rn)
Reply Retweet Like
Benjamin Johnson Mar 23
Replying to @jhoffmcd @kylemh_
Yeah, this is the one case I haven't seen an alternative to snaps yet. When I was doing React Native it was easy cause all styles were inline. 👍
Reply Retweet Like
Benjamin Johnson Mar 23
I guess the thing I've found difficult so far with shallow snaps is how easy it is to get false positives. Like when shallow snaps pass but a component deeper in the tree is actually broken 😭
Reply Retweet Like
Benjamin Johnson Mar 23
Would deep-rendered snapshots or a more focused unit test with assertions do the same?
Reply Retweet Like
Benjamin Johnson Mar 21
Replying to @kentcdodds
YES. This happens to me about 2-3x per day and it's the worst. 😱
Reply Retweet Like
Benjamin Johnson retweeted
SourceStrike Mar 18
Looking to grow your network? 🤔Join us this Thursday as our execs will offer career guidance and discuss innovative ways to level up as an engineer. We want to meet you!…
Reply Retweet Like
Benjamin Johnson Mar 17
Although I forgot how I got there...it was buried pretty deep in the menus
Reply Retweet Like
Benjamin Johnson Mar 17
I have slack for Android and I have dark mode 🤔
Reply Retweet Like
Benjamin Johnson Mar 15
CSS20 - Yay! Now we can argue about JS-in-CSS on Twitter every 4 months
Reply Retweet Like