Re:CSS Grid – Table layout is back. Be there and be square
by mbrock on Tuesday January 31, 2017 @10:24AM
(#13531271)
Could you give an example of how such a Lisp-like syntax would look, to show the improvement?
[ Parent
| on HN ]
Re:CSS Grid – Table layout is back. Be there and be square
by tannhaeuser on Tuesday January 31, 2017 @11:34AM
(#13532086)
Not the one you asked, and purely for historic reasons, but DSSSL, the precursor of XSLT and CSS, was Scheme:
; rule associated to document's element class
(element (section header)
(make paragraph
font-family-name: "Helvetica"
font-weight: 'bold
font-posture: 'oblique
(process-children)
)
)
; rule associated to a particular element uniquely identified with an id:
(id ("ref34")
(make paragraph
font-family-name: "Helvetica"
font-weight: 'bold
font-posture: 'oblique
(process-children)
)
)
[1]: http://dsssl.netfolder.com/DSSSL-markup-Rules.htm
Re:CSS Grid – Table layout is back. Be there and be square
by usaphp on Tuesday January 31, 2017 @11:44AM
(#13532250)
And how is that making it better than CSS? It looks more complicated and still has to use all the same attributes.
Re:CSS Grid – Table layout is back. Be there and be square
by tannhaeuser on Tuesday January 31, 2017 @11:59AM
(#13532446)
I don't advocate using it, I just posted it for historical reference (actually I'm hesitating to post anything LISP here because that will easily derail a thread into becoming off-topic).
But what the snippet shows is how eg. the DOM is traversed explicitly, as opposed to CSS's multiple implicit measurement and layout passes over the DOM. CSS sure is more compact, but doesn't begin to reveal anything like the above snippet.
Re:CSS Grid – Table layout is back. Be there and be square
by kazinator on Tuesday January 31, 2017 @01:56PM
(#13533923)
For one thing, if the rest of the representation of the document (the HTML and script part) was in the same language, maybe the CSS could be condensed with macros, or otherwise procedurally generated on the client side, all in the same syntax.