I've just found out that php can be added to css files by adding
AddType application/x-httpd-php .css
to the .htaccess file.
You then add
<?php header ("Content-type: text/css"); ?>
to all css files in the project.
Many people won't like this because it takes away from the meaning of style sheets, and blah blah blah however it is very useful for example I wrote a simple function:
function linear_gradient($from, $to)
{
return "background:$from;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='$from',endColorstr='$to');background:-webkit-gradient(linear,left top,left bottom,from($from),to($to));background:-moz-linear-gradient(top,$from,$to);";
}
That gives me a cross browser gradient just by calling the function from css. Very usefull!
Anyway, The Problem is, netbeans doesn't highlight the php syntax like it should do in the css file and I get a huge amount of errors like "Invalid content" and "Unexpected symbol" etc etc.
Does anybody know how to alter syntax highlighting so .css file will support php AND css?
(Much like how .php files support php and html)
Thanks