:gem: A Ruby library that will communicate with Embedded Dart Sass using the Embedded Sass protocol
86
stars
1,434
commits
Ruby
primary language
Sep 10, 2026
updated
This is a Ruby library that implements the host side of the Embedded Sass protocol.
It exposes a Ruby API for Sass that's backed by a native Dart Sass executable on supported hardware architectures and platforms or a Node.js Dart Sass executable everywhere else.
gem install sass-embedded
The Ruby API provides two entrypoints for compiling Sass to CSS.
Sass.compile takes a path to a Sass file and return the result of compiling that file to CSS.require 'sass-embedded'
result = Sass.compile('style.scss')
puts result.css
compressed = Sass.compile('style.scss', style: :compressed)
puts compressed.css
Sass.compile_string takes a string that represents the contents of a Sass file and return the result of compiling that file to CSS.require 'sass-embedded'
result = Sass.compile_string('h1 { font-size: 40px; }')
puts result.css
compressed = Sass.compile_string('h1 { font-size: 40px; }', style: :compressed)
puts compressed.css
See rubydoc.info/gems/sass-embedded/Sass for full API documentation.
Disclaimer: this is not an official Google product.
1,160 commits
274 commits
Ruby
100.0%
:gem: A Ruby library that will communicate with Embedded Dart Sass using the Embedded Sass protocol
86
stars
1,434
commits
Ruby
primary language
Sep 10, 2026
updated
This is a Ruby library that implements the host side of the Embedded Sass protocol.
It exposes a Ruby API for Sass that's backed by a native Dart Sass executable on supported hardware architectures and platforms or a Node.js Dart Sass executable everywhere else.
gem install sass-embedded
The Ruby API provides two entrypoints for compiling Sass to CSS.
Sass.compile takes a path to a Sass file and return the result of compiling that file to CSS.require 'sass-embedded'
result = Sass.compile('style.scss')
puts result.css
compressed = Sass.compile('style.scss', style: :compressed)
puts compressed.css
Sass.compile_string takes a string that represents the contents of a Sass file and return the result of compiling that file to CSS.require 'sass-embedded'
result = Sass.compile_string('h1 { font-size: 40px; }')
puts result.css
compressed = Sass.compile_string('h1 { font-size: 40px; }', style: :compressed)
puts compressed.css
See rubydoc.info/gems/sass-embedded/Sass for full API documentation.
Disclaimer: this is not an official Google product.
1,160 commits
274 commits
Ruby
100.0%