.sass

What is a .sass file?

Syntactically Awesome Style Sheets · Code and data · Hampton Catlin / Sass team · 2006

A .sass file is Sass source in the original indented syntax. Like SCSS it extends CSS with variables and nesting, but it drops braces and semicolons in favour of indentation.

Category
Code and data
MIME type
Type
Plain text
Is a .sass file safe to open? Safe. Sass is stylesheet source, not executable code. It compiles to CSS, which only styles a page.

What is a .sass file used for?

The indented .sass syntax is terser than SCSS: whitespace defines structure instead of braces. It is the older of the two Sass syntaxes and is less common today, but works identically once compiled.

A Sass compiler turns .sass into standard CSS. The files are plain text and open in any editor.

How to open a .sass file

The .sass format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list. For a step-by-step walkthrough, see how to open a .sass file.

Windows

  • VS Code
  • WebStorm
  • any text editor

macOS

  • VS Code
  • WebStorm
  • any text editor

Linux

  • VS Code
  • vim
  • any text editor

How to convert a .sass file

You can convert a .sass file to css, scss using a conversion tool or the export menu of an app that opens it.

.sass file signature (magic bytes)

Programs recognise a .sass file by the bytes at the start of the file, not by its name. These are the signatures for Sass.

Hex signatureOffsetNote
(no fixed signature)0plain text; no fixed magic bytes

See the full magic-numbers reference for every format.

Frequently asked questions

What is a .sass file?

A .sass file is Sass source in the original indented syntax. Like SCSS it extends CSS with variables and nesting, but it drops braces and semicolons in favour of indentation.

Should I use .sass or .scss?

Most projects now use .scss because its CSS-like braces are familiar. The indented .sass syntax is equivalent but less common.

How do I open a .sass file?

Any text editor shows it. Watch the indentation, since in the .sass syntax it defines structure.

Can I convert .sass to .scss?

Yes. The Sass tools include a converter (sass-convert) that translates between the indented and bracketed syntaxes.

Related formats

Sources

Details on this page were checked against authoritative references: