>> 1) Perhaps have a look at the approach used by the `xml` and `html` and 
>> `json`
>> libraries, which is 1) parse data from string, 2) store data in nested
>> structs, 3) generate new string from nested-struct thingy.
> 
> I understand this approach, but I do not understand how it is better than 
> what I
> proposed. Can you please elaborate on that?

I just meant: it's an approach that has worked before. "Better"? That's for you 
to decide.


>> Notationally, how is this an improvement over regular CSS? And if it's not,
>> why not use regular CSS notation, and parse it?
> 
> I believe it is easier to build syntactically correct S-expressions than it is
> to concatenate strings to form syntactically correct CSS. 

Perhaps, but looking at your example again, it seems you intend to represent 
CSS values (on the right-hand side) as symbols, using vertical bars to escape 
things like |#444|?

([body
   {#:margin (40px auto)
    #:max-width 650px
    #:line-height 1.6
    #:font-size 18px
    #:color |#444|
    #:padding (0 10px)}]
  [h1 h2 h3
      {#:line-height 1.2}])

If so, while 650px can be made into a symbol, 1.6 and 0 cannot (would have to 
be |1.6| and |0|). Also, certain CSS values have double quotes (for instance 
`font-family`) so the "font-family-name" would have to be notated as 
|"font-family-name"|. 

If I misunderstand your notation proposal, I apologize. But I think that users 
should be spared notational inconvenience wherever possible. 


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to