Code Editor recognizing SCSS

thugsb's Avatar

thugsb

15 Nov, 2012 07:23 PM

I'm now using SCSS ( http://sass-lang.com/ ) on my site, and it is required to name the file style.scss (not .css). However, being named .scss means that the code editor doesn't recognize it as CSS, so doesn't highlight as such. Is there any way I can tell the code editor to highlight .scss files the same as .css files? If I rename it to .css then it does highlight correctly, but then the SASS parser doesn't work.

Don't really worry about the SCSS/SASS stuff, what I'm really asking is whether it's possible to configure the way the Code Editor highlights code.
Thanks!

  1. 1 Posted by Ryan Griffith on 15 Nov, 2012 08:30 PM

    Ryan Griffith's Avatar

    Hi,

    Currently, SCSS file types are not recognized by default; however, there is a way to make this file type editable. Here are the steps I performed:

    • Go to System Menu -> Preferences -> Content
    • Add .scss to both Editable Text File Extensions and Plain Text File Extensions
    • Rebuild your search index by going to System Menu -> Utilities -> Search Indexing (select Rebuild indexes)
    • In a few minutes, try editing the .scss file(s). If nothing loads, try renaming the file to .css and then back again.

    Note: the Advanced Editor won't recognize the extension so you will have to change the syntax highlighter to CSS, it should re-process and highlight.

    Please let me know if you have any questions.

    Thanks

  2. 2 Posted by thugsb on 19 Nov, 2012 02:10 PM

    thugsb's Avatar

    Ah, I didn't see the --Syntax-- dropdown. My bad. Got it working. Thanks!

  3. thugsb closed this discussion on 19 Nov, 2012 02:10 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac