Potentially backwards-compatibility breaking change to the content attribute.

This commit is contained in:
Shinmera 2016-11-25 14:27:32 +01:00
parent 078e440f38
commit ce9a20e60e
No known key found for this signature in database
GPG Key ID: E12B14478BE4C922
2 changed files with 9 additions and 1 deletions

View File

@ -10,7 +10,7 @@
(defsystem lass
:name "LASS"
:version "0.4.0"
:version "0.5.0"
:license "Artistic"
:author "Nicolas Hafner <shinmera@tymoon.eu>"
:maintainer "Nicolas Hafner <shinmera@tymoon.eu>"

View File

@ -135,6 +135,14 @@
(define-special-property font-family (&rest faces)
(list (make-property "font-family" (format NIL "~{~a~^, ~}" (mapcar #'resolve faces)))))
(define-special-property content (content)
;; Backwards compat with the usage of "'foo'" in LASS files
(when (and (<= 2 (length content))
(char= #\' (char content 0))
(char= #\' (char content (1- (length content)))))
(setf content (subseq content 1 (1- (length content)))))
(list (make-property "content" (format NIL "~s" content))))
(defmacro define-browser-property (name args &body browser-options)
"Helper macro to define properties that have browser-dependant versions.