@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

If the person behind me on this plane pulls my seat any harder, I'll be catapulted into business class. Win fucking win.

jaffathecake,
@jaffathecake@mastodon.social avatar

@nsa NEVER

jaffathecake, to random
@jaffathecake@mastodon.social avatar

If you want an element to fully contain margins (and floats, remember them?), but you don't want the contents to be clipped, display: flow-root is what you're looking for. https://jsbin.com/hafawud/edit?html,css,output

jaffathecake,
@jaffathecake@mastodon.social avatar

@bntn I'm not sure what you mean. They're exclusive features.

shadeed9, to random
@shadeed9@front-end.social avatar

The view transitions spec is one of the best (if not the best) specs out there. Full of real-life examples and demos ✨

https://www.w3.org/TR/css-view-transitions-1/

jaffathecake,
@jaffathecake@mastodon.social avatar

@bramus @shadeed9 @nomster yay!

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,
@jaffathecake@mastodon.social avatar

@keul @sil I'm less convinced by that, because folks don't do checked="checked" anymore, which was required by XHTML.

jaffathecake,
@jaffathecake@mastodon.social avatar

@jamesh @keul @sil yes it does

jaffathecake,
@jaffathecake@mastodon.social avatar

@schizanon except that case

jaffathecake,
@jaffathecake@mastodon.social avatar

@thet I agree that it would be nice if the syntax actually worked, but it doesn't https://jakearchibald.com/2024/attributes-vs-properties/

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,
@jaffathecake@mastodon.social avatar

@kleinfreund ohh, good catch. Pushing a fix…

jaffathecake,
@jaffathecake@mastodon.social avatar

@tbroyer ohh this is a great deep dive

jaffathecake,
@jaffathecake@mastodon.social avatar

@callionica I disagree with that position - in the article I talk about how <details open> is a bad design.

jaffathecake,
@jaffathecake@mastodon.social avatar

@callionica I believe the light DOM should be under the author's control, and the serialisation should represent changes the author made, not changes the browser made to itself.

This helps a lot with frameworks where you're trying to express "put the DOM in this shape" without overwriting interactivity, except in cases where you explicitly want that.

jaffathecake,
@jaffathecake@mastodon.social avatar

@colby does it? What should it say?

jaffathecake,
@jaffathecake@mastodon.social avatar

@kleinfreund I see where you're coming from, but you can also explain that by it getting the defaultValue. Your explanation might be more accurate according to the spec, but it duplicates some logic

jaffathecake,
@jaffathecake@mastodon.social avatar

@kleinfreund yeah, that's the way I see it too

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/

jpzwarte, to random
@jpzwarte@fosstodon.org avatar

@jaffathecake @jensimmons Really cool to see STP support view transitions, but i've already noticed differences between Chrome & Safari on https://jakearchibald.com/2024/view-transitions-handling-aspect-ratio-changes/ I assume at this point that the differences are implementation bugs in WebKit?!

jaffathecake,
@jaffathecake@mastodon.social avatar

@jpzwarte @jensimmons yes, these look like bugs to me. The expected layout here is pretty well defined in the spec.

jaffathecake, to random
@jaffathecake@mastodon.social avatar

🧶 ICYMI, here's the latest episode of OTMT, where me and @surma chat about service worker static routes, and whether it's ever ok to throw away most of the web platform and do everything in <canvas>.

Listen here: https://offthemainthread.tech/episode/canvas-based-webapps/

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

I get it. I get the whole point of it. But CSS logical properties are so confusing. Even after reading the first two paragraphs of https://developer.mozilla.org/en-US/docs/Web/CSS/block-size I'm left thinking ENOUGH WITH THE FUCKIN RIDDLES.

Ok, so if display: block makes the thing full width, block-size will change the width.

lol no guess again!

jaffathecake,
@jaffathecake@mastodon.social avatar

@sjorsrijsdam haha I've raged about this before

jaffathecake, to random
@jaffathecake@mastodon.social avatar

It's such a mess that we still can't use headings in HTML fragments, and have the heading structure be local to that part of the document.

It's so shit that browsers shipped the styling part of <section> + <h1> but not the accessibility part. That was the important bit.

jaffathecake,
@jaffathecake@mastodon.social avatar

The only recent spec activity on this is a headinglevelstart attribute which can be set to a number. I proposed an 'auto' value for this, but it was dismissed for the initial feature (but may happen later) https://github.com/whatwg/html/issues/5033#issuecomment-1733292070

  • All
  • Subscribed
  • Moderated
  • Favorites
  • Leos
  • khanakhh
  • magazineikmin
  • Durango
  • thenastyranch
  • Youngstown
  • slotface
  • cisconetworking
  • InstantRegret
  • ngwrru68w68
  • rosin
  • kavyap
  • tsrsr
  • DreamBathrooms
  • modclub
  • hgfsjryuu7
  • everett
  • osvaldo12
  • mdbf
  • tester
  • tacticalgear
  • PowerRangers
  • GTA5RPClips
  • vwfavf
  • ethstaker
  • normalnudes
  • cubers
  • anitta
  • All magazines