@jaffathecake@mastodon.social
@jaffathecake@mastodon.social avatar

jaffathecake

@jaffathecake@mastodon.social

Engineer at Shopify. Once swam to the end of an infinity pool. No thought goes unpublished. 'IMO' implicit. He/him.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

jaffathecake, to random
@jaffathecake@mastodon.social avatar

Rather than allow other browser engines to install-to-homescreen on iOS, Apple is removing the feature entirely in the EU.

Some features are tied to install-to-homescreen, such as push messages. Apple is unshipping those for EU users.

We need to act now: https://open-web-advocacy.org/apple-attempts-killing-webapps/

jaffathecake, to random
@jaffathecake@mastodon.social avatar

📝 The case against self-closing tags in HTML

At best, they're a relic from the past, and at worst, they're actively misleading.

https://jakearchibald.com/2023/against-self-closing-tags-in-html/

jaffathecake, to random
@jaffathecake@mastodon.social avatar

We're baaaaaack! Me and @surma have a new podcast: Off The Main Thread! (google wouldn't let us have the other name, whatever)

In this episode, @surma talks through the architecture of GPUs, and I look at browser 'ideologies' over the past decade.

https://offthemainthread.tech/episode/webgpu-and-browser-ideologies/

jaffathecake, to random
@jaffathecake@mastodon.social avatar

Container queries + cqw units are really handy for making text scale to a container. https://codepen.io/jaffathecake/pen/BaGLPGv

video/mp4

jaffathecake, to random
@jaffathecake@mastodon.social avatar

📝 HTML attributes vs DOM properties.

They're completely different, but often coupled.

Here's the difference, and why it matters: https://jakearchibald.com/2024/attributes-vs-properties/

jaffathecake, to random
@jaffathecake@mastodon.social avatar

Great to see the navigation API land in the HTML spec https://html.spec.whatwg.org/multipage/nav-history-apis.html#navigation-api with positive feedback from Mozilla. It's already shipped in Chrome, and it's so nice to use compared to the history API https://developer.chrome.com/docs/web-platform/navigation-api/

jaffathecake, to random
@jaffathecake@mastodon.social avatar

📝 New post: Handling aspect ratio changes in view transitions.

Lots of tips on customising view transitions, and of course, live demos.

https://jakearchibald.com/2024/view-transitions-handling-aspect-ratio-changes/

jaffathecake, to random
@jaffathecake@mastodon.social avatar

This always catches me out:

When specifying grid-template sizes, if values aren't wrapped in minmax(), then they're implicitly minmax(auto, value).

So 1fr is implicitly minmax(auto, 1fr).

If you actually want 1fr, you need to use minmax(0, 1fr).

https://codepen.io/jaffathecake/pen/BabrWqa

jaffathecake, to random
@jaffathecake@mastodon.social avatar
jaffathecake, to random
@jaffathecake@mastodon.social avatar

el.className and el.htmlFor have weird, incorrect, inconsistent names because old JavaScript didn't allow reserved words to be property names. That changed over a decade ago, so should we add el.class and el.for? https://github.com/whatwg/html/issues/9379

jaffathecake, to random
@jaffathecake@mastodon.social avatar

📴🧵 OMGOTMT it's a new episode of Off The Main Thread!

In this episode, @surma talks about Bevvy, an ECS game engine written in Rust, then we take a look at TC39 Stage 3 stuff that hasn't yet gone into browsers, and pick some favourites.

https://offthemainthread.tech/episode/tc39-roundup-and-ecs/

jaffathecake, to random
@jaffathecake@mastodon.social avatar

Great to see Apple (along with WhatsApp and Signal) take a stand against the UK's dumb surveillance bill https://www.bbc.co.uk/news/technology-66256081

jaffathecake, to random
@jaffathecake@mastodon.social avatar

A common misconception about the event loop is that it's a JavaScript thing. Nah, the event loop is the scheduler for what we often call the 'main thread'. Sure, that's where JavaScript runs, but it's also where the document lives, and style, and layout.

A single 'task' can involve zero JavaScript (eg turning a click into following a link), or lots of JavaScript (multiple event listeners).

jaffathecake, to random
@jaffathecake@mastodon.social avatar

Yay! React 19 will have custom element support! https://github.com/facebook/react/issues/11347#issuecomment-1899140345

jaffathecake, to random
@jaffathecake@mastodon.social avatar

If you're adding view transitions to your sites, the Material Design guides have some great examples, and some patterns to avoid. I don't think their word is law, but there are a lot of good ideas here.

https://m3.material.io/styles/motion/transitions/applying-transitions

jaffathecake, to random
@jaffathecake@mastodon.social avatar

Really sad that the Navigation API isn't being included in interop 2024. This API makes a night-and-day difference to handling navigations. It cannot be polyfilled, and cannot really be used as progressive enhancement. We need it yesterday. https://github.com/web-platform-tests/interop/issues/435#issuecomment-1921896911

View transitions isn't being included either, but I'm less sad about that, because it can be used as progressive enhancement. https://github.com/web-platform-tests/interop/issues/437#issuecomment-1921897450

jaffathecake, to random
@jaffathecake@mastodon.social avatar

Surprised that HTML doesn't have a way to get the language of an element, and observe changes in that value. Seems important when localising custom elements.

Wrote up a proposal: https://github.com/whatwg/html/issues/9918

jaffathecake, to random
@jaffathecake@mastodon.social avatar

It still seems weird to me that Prettier will turn <br> into <br />.

The / is there from XHTML - a standard that became redundant in the late 2000s.

The space before the / is there for compatibility with Netscape Navigator 4 - an engine that was dropped in the late 90s.

jaffathecake, to random
@jaffathecake@mastodon.social avatar

We use self-closing syntax in HTML where it doesn't do anything. People see it and assume it does something.

Why do we keep doing this to ourselves?

https://www.reddit.com/r/webdev/comments/1cceb03/i_thought_i_knew_html_until_i_saw_this/

jaffathecake, to random
@jaffathecake@mastodon.social avatar

As I was heading to bed, my dad said "remember to brush your teeth". I'm 39.

jaffathecake, (edited ) to random
@jaffathecake@mastodon.social avatar

Take a look at https://static-misc-3.glitch.me/reduced-motion/. What do you think of the result?

jaffathecake, to random
@jaffathecake@mastodon.social avatar

This resonates. Due to changes at the top, Google became a place where you succeeded not by doing the right thing, but by being a business wanker.

https://www.tbray.org/ongoing/When/202x/2024/01/15/Google-2024

jaffathecake, to random
@jaffathecake@mastodon.social avatar

Wait wait wait wait… AV1, the latest and greatest video format, adopted by browsers, does not support an alpha channel??

What???

jaffathecake, to random
@jaffathecake@mastodon.social avatar

I asked Suno to create a German industrial song about the second coming of Jesus but this time he's a cucumber.

The chorus has been stuck in my head all week.

https://app.suno.ai/song/1ebf2eed-1161-444f-92cc-1da585f94ed1/

jaffathecake, to random
@jaffathecake@mastodon.social avatar

🧶 What would it mean to "put React in the browser"?

Can something like element.replaceHTML(html) be added to the platform to perform diffing and update the DOM?

Me and @surma talk it through: https://offthemainthread.tech/episode/putting-react-in-the-browser/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • normalnudes
  • khanakhh
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • GTA5RPClips
  • tacticalgear
  • Youngstown
  • thenastyranch
  • slotface
  • rosin
  • kavyap
  • ethstaker
  • mdbf
  • JUstTest
  • Durango
  • Leos
  • provamag3
  • cubers
  • ngwrru68w68
  • everett
  • modclub
  • cisconetworking
  • anitta
  • megavids
  • osvaldo12
  • tester
  • lostlight
  • All magazines