Re: [Haskell-cafe] Elegant & powerful replacement for CSS

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). Well, if you think about CSS as in webpage styling, it's simply a way to override some attributes in the DOM tree. If you will, you can easily relate CSS selectors to your semantic editor combinators, since a concrete stylesheet makes explicit references to the structure of the document/interface it is associated with. One important difference is that in the case of CSS you don't need to mention all the intermediate nodes explicitly, which can make selectors shorter as well as "non-deterministic", i.e. they can match different structural patterns at the same time. Also, you can perform a kind of pattern matching (filtering by class/id names) besides just blindly walking down the tree along the type structure. I'd say these two features make it a direct generalisation of the SEC concept.
Gergely -- http://www.fastmail.fm - The way an email service should be

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Patai Gergely wrote: | Well, if you think about CSS as in webpage styling, it's simply a way to | override some attributes in the DOM tree. If you will, you can easily | relate CSS selectors to your semantic editor combinators, since a | concrete stylesheet makes explicit references to the structure of the | document/interface it is associated with. One important difference is | that in the case of CSS you don't need to mention all the intermediate | nodes explicitly, which can make selectors shorter as well as | "non-deterministic", i.e. they can match different structural patterns | at the same time. Also, you can perform a kind of pattern matching | (filtering by class/id names) besides just blindly walking down the tree | along the type structure. I'd say these two features make it a direct | generalisation of the SEC concept. This reminds me of Scrap Your Boilerplate. Perhaps looking at SYB would be a reasonable start to generalizing SECs in this context? - - Jake -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkmIukAACgkQye5hVyvIUKkkrwCfaDJxjumLR92aIiGIvXtXH20G XiwAniEslqswXJYdeRW2hx2a6rdf3cdj =y/g1 -----END PGP SIGNATURE-----
participants (2)
-
Jake McArthur
-
Patai Gergely