Live data from Hacker News

On The (2021)

benmyers.dev

61–70 of 138 posts

Re: On The <dl> (2021)

#61
post #44
post #35

Earlier quoted context omitted.

most specifically the problem is that markdown tables don't allow breaking the table row in multiple lines but then you can always use HTML tables in markdown and Pandoc transforms it just fine

has worked fine whenever I’ve needed line breaking in markdown tables

They mean in the Markdown code, not in the output.

Re: On The <dl> (2021)

#62
This is going to be unpopular here, but life became easier when I quit trying to write semantic HTML. It’s just poorly designed, I’m sorry. Every time I’ve reached for a I’ve eventually regretted it because I wanted multiple levels of wrappers, or a divider between sections, or an icon, or a heading spanning multiple key-value pairs, etc. They make this stuff with some flexibility but nowhere near enough to actually cover the generalized concept it purports to. I still use the corresponding elements when there are observable benefits, of course, like , , etc, but when all it’s going to do is not quite fit the data model and force me to override everything, it’s just not a practical choice.

It shouldn’t be so controversial to say that if 99% of usage routes around your API, it’s probably the API’s fault.

Re: On The <dl> (2021)

#63
post #26
post #16

The GOV.UK Design System summary list component is a description list https://design-system.service.gov.uk/components/summary-list... And... it also uses the wrapper div for styling

The wrapper div is making me a bit sad. These days, using grid layout, you don’t actually need it in most cases

Absolutely!

I put dl lists in a grid with no divs needed. As MDN says, div is the last resort, invariably there is something better, and nowadays that is grid styling.

New to me is multiple dd's.

For legacy layouts littered with divs and classes, display: contents helps get rid of the div wrappers, promoting whatever is wrapped.

Even with disclosure elements there are ways to avoid div wrappers using the pseudo element for everything enclosed by the details element apart from the summary element.

Re: On The <dl> (2021)

#64
post #62

This is going to be unpopular here, but life became easier when I quit trying to write semantic HTML. It’s just poorly designed, I’m sorry. Every time I’ve reached for a I’ve eventually regretted it because I wanted multiple levels of wrappers, or a divider between sections, or an icon, or a heading spanning multiple key-value pairs, etc. They make this stuff with some flexibility but nowhere near enough to actually…

Sounds like it's CSS' fault then. I think that just like they introduced `display:contents` to remove wrappers, they should also introduce a way to group elements as if they had a common ancestor.

    :wrap(dt, dt+dd) {border: solid 1px}

Re: On The <dl> (2021)

#65

I was a bit surprised to see nested s given as some sort of precursor pattern, when was part of HTML before 2.0 back in the days of table layout.

It’s probably aimed at React developers, many of which are probably not even aware that elements other than exist.

Re: On The <dl> (2021)

#66
post #44
post #35

Earlier quoted context omitted.

most specifically the problem is that markdown tables don't allow breaking the table row in multiple lines but then you can always use HTML tables in markdown and Pandoc transforms it just fine

has worked fine whenever I’ve needed line breaking in markdown tables

I think they mean breaking the line in the markup, not the output

Re: On The <dl> (2021)

#67
post #26
post #16

The GOV.UK Design System summary list component is a description list https://design-system.service.gov.uk/components/summary-list... And... it also uses the wrapper div for styling

The wrapper div is making me a bit sad. These days, using grid layout, you don’t actually need it in most cases

The problem with 'in most cases' when it comes to a design system that's used in hundreds of different ways across departments and services, is that some week break.

I don't really like the div either (I use the design system all day, and maintain a set of components), but it makes documentation much easier.

Re: On The <dl> (2021)

#68
post #59

The tag seems to cover a subset of a broad semantic space, but doesn’t easily extend beyond adding another . I dunno, I guess I’m a caveman. If it looks right and works (including accessibility) then I figure I’m pursuing something that doesn’t matter a lot.

Shameless plug: you might be interested in https://calvinlc.com/p/2026/02/11/everything-is-a-div.html I need to learn more about web accessibility, but if you completely ignore it (and other sane practices) HTML looks really simple. I think the design of HTML is just too much. There’s so many tags that don’t do much. It’s like w3c decided that any common thing people use in websites needs a tag. The end result is mor…

Oh that’s great. It’s an opinionated view that focused strictly on the behavior of the tags wrt layout and appearance.

I’ve noticed that discussions of semantic meaning of tags often contain the word “feel.” Nothing wrong with that, taste matters, but it does point to the non-functional goals that are being pursued when people disagree.

vs - they are both ordered, because markup is ordered. One gets decorated differently than the other by default. Is the difference semantic or typographical?

Re: On The <dl> (2021)

#69
It always bugs me that the naming of the element does not seem to really fit examples like „Author: Tolkien“. It‘s not that _Tolkien“_ „defines“ the „term“ _Author_ right? The elements are still used for key-value-lists and no one seems to notice or comment on this issue.

Am I the only one?

Post reply on HN