Live data from Hacker News

I'm betting on HTML

catskull.net

221–230 of 458 posts

Re: I'm betting on HTML

#221
post #165

ugh I was so excited to see pure HTML modals were a thing with only to find out there's no way of triggering them without JavaScript. Using pure HTML you can only dismiss them, not trigger them. https://github.com/whatwg/html/issues/3567 > dialog elements are a great addition and I'm glad they're getting implemented, but a key part of their functionality relies on JavaScript: to open a you need to use JavaScript to s…

You can implement modals without JS, with HTML and CSS.

For an example, click on '?' in the top right corner here: https://aavi.xyz/proj/colors/

Re: I'm betting on HTML

#222
The problem I see with sematic web is that no matter how easy it gets, developers refuse to use it properly. I have been looking closely at the tag since a browser extension of mine uses it, and although it is extremely clear what it should do in the MDN documentation (the documentation itself is a good example usage of , etc.), very little sites use it properly. Even the fancy professional sites wrap all the page content, including navigation, footers and the like inside the tag, which should only be for the main content of the page.

If such a simple element can't be used properly, I have no hope for all the others.

Re: I'm betting on HTML

#223

Earlier quoted context omitted.

In general the issue with these built in components is that you can't theme them. And they stick out like a sore thumb when you get a windows 7 style component in the middle of a modern looking app. They also have basically no extensibility so when you inevitably need to do something half complex, you have to scrap it and start again with JS. So you may as well have just started with JS which just works, gives you fu…

This is my biggest criticism of all these modern HTML pseudo components. It’s a wonderful idea, truly, but if you don’t provide style hooks to customize and theme them they are useless. A month ago I wanted to use the input + datalist to have a searchable drop-down but there was no way to control where the dropdown will appear when popped open and what width will it have. Eventually I just gave up. Such a shame.

100% agree. One big challenge is that we've made browsers and the full list of web specs so complicated that we're likely not going to see any new browser rendering engines competing any time soon.

Ideally we would all take a bit of a step back and throw out old specs that aren't needed and improve the ones that need it, like styling support for built-ins. Unfortunately we're at the whims of Google and Appe though, and I can't imagine they would ever be interested in such a potentially large rewrite to their browsers when it functions as-is

Re: I'm betting on HTML

#224
post #210

Earlier quoted context omitted.

Beware: some of these are effectively hacks possibly messing up the browser history or introducing accessibility issues for screen readers, keyboard users, or otherwise.

Exactly. Level 0 developer: don't know how to do this in JS Level 1 developer: knows how to do things in JS, even when sometimes it should not Level 2 developer: knows how to do things without JS Level 3 developer: knows when to use JS and when to use CSS or something else to achieve the goal

I was more the opposite. I avoid learning JS for as long as possible since it seemed so complicated following the resources I tried to learn.

Ideally we’d have just a few more semantic elements that are obvious common patterns introduced to the HTML spec (like details & dialog were). We’re pretty close now, but I would like to see better accessible no-JS options for building menus.

Re: I'm betting on HTML

#225
post #5

Great read and interactive demo. After a few years of dabbling with Flutter I just came back to the same conclusion: bet on HTML. Astro / Tailwind / Daisy UI / Alpine.js makes it lovely to build an HTML site with a lot of simple SSR and a little bit of client side reactivity peppered about. The result is simple sane HTML files that look and work great on desktop web browser and and mobile wrapped web view. My app is…

Exporting to web using Flutter is a nightmare I believe. When I checked last time, rendering happens on a canvas. There is no markup at all

> rendering happens on a canvas

flutter run --web-renderer=html

Re: I'm betting on HTML

#226
I think SEO is dead and the Semantic web will soon take over as search transitions to LLMS. If your data is better digested with minimal work by the LLM trainers, does your content perform better?

And maybe search isn’t the killer feature of the semantic web, maybe it will be agents?

Re: I'm betting on HTML

#227

Earlier quoted context omitted.

then realized there's literally no way to tell. It's all flat. I hate that. I'm waiting for that fad to be over. I kind of liked material design, but it's too much of a pain to put into everything. Flat, borderless, and unidentified is so easy to do. The all flat approach encourages dark patterns. Lists of trackers you can opt out of, scrollable, with no scroll bar and no window border. There are important buttons hi…

There is something nice about plain old default look and feel. It probably is the kind of feedback they give, that does not require me to always roll my eyeballs elsewhere for confirmation, that my click did actually cause some action to start.

Right.

The flat look is borrowed from phones, from UIs where buttons were few and large, and the concept of "mouse-over" is not meaningful. Now it's everywhere, even for complex interfaces where it's not appropriate.

Re: I'm betting on HTML

#229
post #22

I had heard of almost none of these HTML elements, and that's such a shame, because they could seriously help put the "we need JavaScript for every gosh darn thing" ecosystem to an end (or at least return JS to what it was originally meant to be: a way to add some flair, some interactivity, some whatever, but not necessarily a replacement for all of your markup and a full-DOM manager). I'm starting to think my dream…

You might like this: http://youmightnotneedjs.com/

Seems like aot of people misunderstand what these examples are best for. Sure you wouldn't want to ship these as-is on most sites, but it shows how much can be done without JS. That can/should make it more clear that you can likely get by with much less JS when you do need to reach for it.

It's not about throwing out JS, it's about avoiding 30kb of JS if all you need is a few summary/detail elements where only one can be opened at a time. Use the example code here then write a small I line script that closes all siblings. Done.

Re: I'm betting on HTML

#230

I really want to believe in the semantic web, I really want to believe in the ability of the browser to provide me with good default modules with a good default styling, but for now I just have to accept this is not the case. The fact that I have to think about labeling a input (why is this not an attribute ?), not being sure if I should use it as a wrapper of as a sibling with the `for=` attribute... and this is jus…

(I don't know what tools you use so this isn't a comment directed at you specifically) If web developers spent a fraction of the time required to learn react, tailwind, etc on learning HTML the web would be in a much better spot. There are definitely quirks and rough edges, but if every web devs knew how to get the most out of semantic HTML we'd likely have a lot less JS in the browser, fewer accessibility bugs, and…

> on learning HTML

Anecdote. Was recently freelancing at a web-agency. They build complex web-apps. Lot's of senior and experienced web-devs there: react, mui, typescript, tailwind, and a large host of backend frameworks under the belt.

But when I built a quick PoC using `` a few lines of JS and some of the elements used in the article (meter, dialog, details) they were flabbergasted. This was a whole team of experienced developers doing web-ui development for their job, 40+ hours a week. And they didn't know, not even realized, that HTML had them covered for loads of use-cases.

Edit: I am no frontend-dev, so I have to look up everything anyway. Which is probably why I come across those "new" things easier.

Post reply on HN