[Haskell-cafe] Elegant & powerful replacement for CSS

Luke Palmer lrpalmer at gmail.com
Tue Feb 3 16:25:52 EST 2009

On Tue, Feb 3, 2009 at 2:06 PM, Thomas Davie <tom.davie at gmail.com> wrote:

> On 3 Feb 2009, at 20:39, Conal Elliott wrote:
>  [Spin-off from the haskell-cafe discussion on functional/denotational GUI
>> toolkits]
>> I've been wondering for a while now what a well-designed alternative to
>> CSS could be, where well-designed would mean consistent, composable,
>> orthogonal, functional, based on an elegantly compelling semantic model
>> (denotational).
> Can I start by replacing html please :)
> I'd like to separate the document in roughly the same way as html and css
> attempt to, meaning I'd like a document description language, and a styling
> description language.
> I can imagine the styling language having the meaning "function from
> documents onto geometry", but the document description language is harder.
>  Ideally what I'd like to do with it is to make it describe *only* the
> logical structure of the information being conveyed – sections, text,
> figures, tables (no, not for layout, for tabular data) etc.

This is easy to me.  Everything is content.  Sections, text, figures, tables
-- these are all static content.  Functions are interactive content.
Numbers are content, as are lists of content, maybe content ...

The interesting part is how you display it.  In the simplest sense, a
"style" is just a function Style a = a -> Geometry.  But work has been done,
eg. with TVs, that have composition of content and composition of the
display mirror each other.  I'm not totally satisfied with TVs.  For
example, I think it's worth exploration describing *how* the content was
composed, such that styling language maps compositions of content to
compositions of geometry.

Content is not interesting.  The *mapping* from content to presentation is
the important part.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090203/e4305938/attachment.htm

More information about the Haskell-Cafe mailing list