[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Proprietary CSS properties in css-mode

From: Deniz Dogan
Subject: Proprietary CSS properties in css-mode
Date: Thu, 6 May 2010 11:44:22 +0200

I've modified css-mode.el to recognize "proprietary" or
"vendor-specific" CSS properties such as -moz-border-radius and give
them a special face which inherits from the `css-property' face.

Is this controversial?

Either way, I don't currently have access to a diff-like program, so
here are the changes I would like to see:

;; Add this:
(defconst css-proprietary-ident-re
  (concat "[-_]\\(?:ms\\|moz\\|o\\|webkit\\|khtml\\)-[[:alnum:]-]+"))

(defface css-proprietary-property '((t :inherit css-property))
  "Face to use for proprietary properties."
  :group 'css)

;; ...and add this entry to `css-font-lock-keywords':
    ;; Proprietary properties.
    (,(concat "\\(?:[{;]\\|^\\)[ \t]*\\(" css-proprietary-ident-re "\\)\\s-*:")
     (1 'css-proprietary-property))

Deniz Dogan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]