HeinrichApfelmus / threepenny-gui

GUI framework that uses the web browser as a display.
https://heinrichapfelmus.github.io/threepenny-gui/
Other
439 stars 77 forks source link

Layout combinators to simplify GUI layout. Take 2. #70

Closed HeinrichApfelmus closed 7 years ago

HeinrichApfelmus commented 10 years ago

This is essentially a continuation of issue #24 .

The goal of Threepenny is to make GUI development easy, and this also includes the visual aspects of UI design. Unfortunately, HTML and CSS are terrible languages for specifying box layouts.

What we really want is a nice Haskell API that hides the complexities of CSS and offers a nice way to specify layout. The grid, column and row combinators are a good start, but they are currently implemented as CSS tables, which tend to behave unpredictable, especially when content size changes dynamically.

Fortunately, it appears that the CSS 3 offers a new feature, flexbox layout, which apperas to solve most of the layout woes. Flexboxes may be a good start for implementing proper layout combinators in Haskell.

Flexboxes only work in newer browsers, but we could bundle our own browser during deployment #52 .

HeinrichApfelmus commented 7 years ago

Discussion moved to #98 .