[parenscript-devel] BUG in css-to-string?

Stuart Overton stuartoverton at gmail.com
Wed May 21 21:45:53 UTC 2008


I'm really liking parenscript and just got started with it, so this
question might be off base, but here goes...

I'm writing a parenscript/cl-who/hunchentoot application, and I'm
using some code along the lines of:

 (css-to-string
   '(((a.foo)
      (:color "green" :font-size "25pt"))
   ((a.foo\:hover) (:color "red"))))

which generates the following string:

"A.FOO {
   color:green;
   font-size:25pt;
}

; A.FOO:HOVER {
   color:red;
}

"

Firefox doesn't seem to like the second rule, since it starts with a semicolon.
The code of css-to-string I have is:

(defun css-to-string (rules)
  (string-join (mapcar #'css-rule-to-string rules) "; "))

If I substitute it with

(defun css-to-string (rules)
  (concatenate 'string (mapcar #'css-rule-to-string rules)))

That problem goes away and Firefox recognizes the second rule.

Am I doing something wrong or is this a bug?



More information about the parenscript-devel mailing list