I'm a fan of the clean, Pythonesque feel of indented SASS, but I recognize that it's better for my team to use SCSS since it's an extension of CSS, and there's more support for SCSS in docs and forums. So how might I view and edit files as SASS but commit them as SCSS?
- Checkout
.scss
files from a repo - Open them in an editor and see indented SASS
- Make changes in indented SASS
- Commit changes as
.scss
I expect that it's possible since, as one of the developers who helped create Sass wrote,
The difference is syntax. Underneath the textual exterior they are identical. This is why sass and scss files can import each other. Actually, Sass has four syntax parsers: scss, sass, CSS, and less. All of these convert a different syntax into an Abstract Syntax Tree which is further processed into CSS output or even onto one of the other formats via the sass-convert tool.
Use the syntax you like the best, both are fully supported and you can change between them later if you change your mind.
I'm using VSCode, and I've looked through dozens of extensions and linters, but I haven't found any that appear to offer this feature. Reasons why this is a bad idea are welcome if they're in good faith or good fun.