Top
Best
New

Posted by encyclopedism 1 day ago

HTML Can Do That(chrisburnell.com)
466 points | 129 commentspage 3
ChadNauseam 3 hours ago|
my personal favorite, although css not html, is “field-sizing: content”. Finally with iOS 26 we can have input fields that expand to fit the content
hyperhello 6 hours ago||
I don’t understand why the group invented these new attributes and methods of action for dialogs that don’t seem relevant to anything else. Was there some silly patent to work around?
esprehn 6 hours ago|
As opposed to what? Not sure what the alternative you're picturing is.
hyperhello 6 hours ago||
popovertarget="example-dialog" popovertargetaction="hide"

It’s all binding. This is what JavaScript is for: dynamic content.

Aachen 4 hours ago||
Input fields are dynamic elements. Textareas can be resized. Pages can be scrolled. Why implement everything anew in custom code if it can be implemented once per browser engine in native code, native UI, and expected/homogenous UX?
hyperhello 4 hours ago||
I mean the action and target attributes don’t seem to appear anywhere else but the popover api. I’m in favor of HTML dialogs, I just don’t see the point in the trend of making everything into this declarative nightmare it’s becoming when we have onclick=dialog.show() without even quotes.
esprehn 1 hour ago||
Script attributes are very often disabled for security reasons.

The declarative actions API is currently only used for popover, but it's been discussed for over a decade to allow SSR of rich content that's interactive before script loading. See also https://developer.chrome.com/blog/command-and-commandfor

For a long time I also pushed back on these interactive APIs because script is a better primitive and every site seems to have quirky requirements. I've come around on it though because there's huge demand for SSR again and businesses are seeing the value in very fast TTI.

I do still think the date picker API is a disaster. Everyone actually needs something much richer than the system date picker. Travel websites want ranges. People want to put dots and day highlights. I wish they'd fix that next.

hyperhello 3 minutes ago||
What I guess this all leads to is that we’re trying to create some kind of DSA that doesn’t have the possibility to hang or crash the way imperative programs must have the ability to if they are to be effective. So it seems like web design is an avalanche of sort of silly css prefixes and selectors and attributes that refer to object ids and everything, when what we might have said instead is that if a script takes more than one second wall clock or something equivalent adjusted to standard then it gets rolled back like a transaction.
underdeserver 2 hours ago||
Loved the Zelda reference.
CodesInChaos 5 hours ago||
What I'd like to see are searchable drop-downs (not to be confused with text input with suggestions).

And the date/time picker controls are too limited for many applications.

Aachen 5 hours ago|
Do I understand that first one correctly as datalist without allowing the user to submit a value not on the list?
CodesInChaos 4 hours ago||
That, and how it's rendered needs to be separate from the value the the input gets. Just like `<option value="123">John Doe</option>` or ideally even rich html like `<option value="123"><small>123</small> John Doe</option>`.

I guess the best way to render it would be exactly like `<select>` when closed, but when opened there should be a search box where it'd normally show the first option.

Clicking search would call a javascript function, which could then adjust the set of available options via the standard DOM APIs.

Alternatively they could add support for a special element `<selecthead>` which can contain whatever you want, which would render fixed at the when the drop down is opened and can be interacted with like normal html elements. Then you could place your own search fields inside.

cush 4 hours ago||
It's weird that the pure html dialog still doesn't handle inertness yet
220hertz 3 hours ago||
Here we all are in 2026, talking about HTML, like madmen.
peesem 3 hours ago||
once again, i will ask: why do people care so much about only having one <details> element open at a time? let me see what i want to see!
abanana 25 minutes ago|
Yes, absolutely, and UX experts such as those at the Nielsen-Norman group have for years been advising against auto-closing the already-opened options when opening another. For good reason - user frustration in their research.

If I clicked it to open it, then if I want to close it, I'll click it again. Don't hide content I might still be reading!

werdnapk 4 hours ago||
<details> is still not animatable?
esprehn 1 hour ago||
You can animate it now. There's no default though which is a bit annoying. I wish we had made it animate open/closed smoothly.

https://austingil.com/animating-details-element-with-only-cs...

https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/S...

adzm 1 hour ago||
It is! Add css animation to the ::details-content pseudo element
br0ceph 2 hours ago||
js is web remote code execution. we need to return to an html only browser world.

theres no reason for a browser to be an OS/compiler/abi, for remote code.

this is the dumbest shit in the history of computers. why didnt everyone have they torches and pitchforks, when web2.0 became a thing?

mabini 5 hours ago|
Just because you can, it doesn't mean you should
abanana 17 minutes ago||
Although I've used that phrase myself in the past, I've come to hate it. Somebody will post it on every HN thread where any form of suggestion has been made.

If it's part of a paragraph of insightful commentary, it's meaningful. On its own it's not, it appears as though the poster chose to copy-and-paste a cliché instead of bothering to tell us what their specific disagreement even is (perfectly reasonable sarcasm from the sibling comment notwithstanding).

Aachen 5 hours ago||
Exactly. Why reïmplement features in JS just because you can? Waste of effort and usually a worse user experience!

Wait, that wasn't what you meant?

More comments...