# + PHP leads to extra whitespace in CSS
If I have the following code in a <style> block inside a PHP file...
.greenbuttons { color: #<?php cfg('green'); ?>; }
... and I hit Ctrl-Alt-L to reformat the file I end up with...
.greenbuttons { color: # <?php cfg('green'); ?>; }
... which doesn't work. If I have a hard coded color like #00FF00; then the space isn't added.
Is this something I have set wrong somewhere? I don't see settings that affect spaces following the # symbol?
Thanks!
P.S. If it helps, my about dialog says this is PHPStorm 2016.1 Build #PS-145.258.
请先登录再写评论。
PHPStorm doesn't support injecting PHP code in CSS color value (related ticket: https://youtrack.jetbrains.com/issue/WI-27479). As the code can't be parsed correctly, there is no way to get it correctly formatted - any attempt to auto-format such code would result in broken syntax