;; http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ (define (special-html tag elems) (list #\newline "\n" "\n" "\n" " " (if (and (pair? elems) (pair? (car elems)) (eq? '@ (caar elems))) (list #\< tag (cdar elems) #\> " " (cdr elems) ") (list #\< tag #\> " " elems ")))) (push! `(html . ,special-html) sxml-conversion-rules) (define (if-ie-guts conditional) (define (comparison? sym) (member sym '(< > <= >=))) (define (translate-comparison sym) (case sym ((<) "lt") ((<=) "lte") ((>) "gt") ((>=) "gte"))) (string-join (match conditional (() '("IE")) (((? number? x)) (list "IE" (number->string x))) (((? comparison? sym) (? number? x)) (list (translate-comparison sym) "IE" (number->string x)))) " ")) (define (if-ie tag elems) `((inject ""))) (push! `(if-ie *macro* . ,if-ie) sxml-conversion-rules)