Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 585fc9f84c
Fetching contributors…

Cannot retrieve contributors at this time

49 lines (39 sloc) 1.516 kB
(eval-after-load 'mmm-vars
'(progn
(mmm-add-group
'html-css
'((css-cdata
:submode css-mode
:face mmm-code-submode-face
:front "<style[^>]*>[ \t\n]*\\(//\\)?<!\\[CDATA\\[[ \t]*\n?"
:back "[ \t]*\\(//\\)?]]>[ \t\n]*</style>"
:insert ((?j js-tag nil @ "<style type=\"text/css\">"
@ "\n" _ "\n" @ "</script>" @)))
(css
:submode css-mode
:face mmm-code-submode-face
:front "<style[^>]*>[ \t]*\n?"
:back "[ \t]*</style>"
:insert ((?j js-tag nil @ "<style type=\"text/css\">"
@ "\n" _ "\n" @ "</style>" @)))
(css-inline
:submode css-mode
:face mmm-code-submode-face
:front "style=\""
:back "\"")))
(dolist (mode (list 'html-mode 'nxml-mode))
(mmm-add-mode-ext-class mode "\\.r?html\\(\\.erb\\)?$" 'html-css))))
;; Colourise CSS colour literals
(autoload 'rainbow-turn-on "rainbow-mode" "Enable rainbow mode colour literal overlays")
(dolist (hook '(css-mode-hook html-mode-hook sass-mode-hook))
(add-hook hook 'rainbow-turn-on))
(defun maybe-flymake-css-load ()
"Activate flymake-css as necessary, but not in derived modes."
(when (eq major-mode 'css-mode)
(flymake-css-load)))
(add-hook 'css-mode-hook 'maybe-flymake-css-load)
(eval-after-load 'auto-complete
'(progn
(dolist (hook '(css-mode-hook sass-mode-hook))
(add-hook hook 'ac-css-mode-setup))))
(provide 'init-css)
Jump to Line
Something went wrong with that request. Please try again.