News for hackers. Stuff that matters.
Re:Modern Javascript: Everything you missed over the last 10... by hnbad on Monday May 17, 2021 @07:13AM (#27182185)
> Like, how many lines of code does the most basic vbox/hbox thing requires in web technology?

CSS:

    .vbox, .hbox { display: flex }
    .vbox { flex-direction: column }
    .vbox > *, .hbox > * { flex-grow: 1 }
HTML:

    <div class="hbox">
      <div class="vbox">
        <button>Top left</button>
        <button>Bottom left</button>
      </div>
      <div class="vbox">
        <button>Top right</button>
        <button>Bottom right</button>
      </div>
    </div>
Or was that a rhetorical question?

There are no comments on this comment yet.