Don’t compile @import files in LESS with PHPStorm




Screencasts – WP Theme Tutorial show

Summary: Something I missed for a while when working with PHPstorm and LESS is how to compile just the top level files only. I wanted to be able to break out the styles for menus and widgets in to their own LESS files, but I didn’t want 9 CSS files to enqueue. Take a look at this screenshot to get a visual idea of what I’m talking about. File Watchers To access the LESS compile settings press ⌘, and select File Watchers in the admin panel. Then click on LESS and then press ‘Enter’ or select edit from the menu at the bottom. Then in the next dialogue that pops up simply select ‘Track root files only’. Yeah that’s it I missed a single checkbox for months. Screencast