logoalt Hacker News

halaprotoday at 4:35 PM3 repliesview on HN

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}

Replies

eurleiftoday at 5:40 PM

Proposal from 2016 (closed): https://github.com/w3c/csswg-drafts/issues/588

WorldMakertoday at 6:16 PM

With CSS Grid math you can fake it, at least. If your DL is `display: grid;` and if you have a few extra DIVs lying around at the bottom of the DL to be borders around combined cells you just have to math which rows/columns you want to draw a border around and make the div fit that combined shape.

cubefoxtoday at 5:50 PM

Good idea. Together with ::after / ::before and content: (which can insert text into the website) it might then be possible to create a website without any HTML, only CSS.