Search code examples
sassphpstormlive-templates

Live Template is not supported in *.scss but *.css and *.less in PHPStorm


I set a few frequently used live templates like:

sm

@media (max-width: @screen-sm-max) {
    $START$
}

md

@media (max-width: @screen-md-max) {
    $START$
}

lg

@media (max-width: @screen-lg-max) {
    $START$
}

They are all working well in .less file, however when I switch to SCSS, they are all not working.

I have checked live template context to CSS.

What can I do to make it works with SCSS file too?


Solution

  • When creating live template, make sure correct context are checked, for live template I wrote above, I should check ruleset list. Of course, if you don't know which one to check, you can just check all checkbox in the program language context. There shouldn't have any big deal.