How can I highlight PHP in a *.css file?
I've a CSS file which also includes PHP directives with <? and ?>.
I cannot change the extension (framework requirement) but still would like to get PHP detection.
For me currently it's not just the benefit of having syntax highlighting but also of having the PHP blocks being marked as errors in CSS.
I'm using 7.1.3
thanks
Please sign in to leave a comment.
Hi there,
Yes, you can do this .. but this requires changing some IDE-wide settings that would affect ALL projects unless you can have unique file name pattern.
1) So .. if you can -- give such files some complex extension (e.g. "*.php.css"). This is just to have some unique file name pattern.
2)
3) "Settings | Template Data Language" -- find your file(s) or whole folder(s) and assign "CSS" in the right column to them.