百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

sassc-ruby

> 编程语言
开源

使用 libsass 与 Ruby 进行搭配!

364 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

使用 libsass 与 Ruby 进行搭配!

SassC Has Reached End-of-Life

The sassc gem should no longer be used, and will no longer be receiving any updates.

The sass-embedded gem is the recommended way to move away from sassc. It bundles the Dart Sass command-line executable, and uses the Embedded Sass Protocol to provide a Modern Ruby API for compiling Sass and defining custom importers and functions.

If you find it difficult migrating to the Modern Ruby API, the sassc-embedded gem is a drop-in replacement for the sassc gem. It provides the same Legacy Ruby API, but internally runs sass-embedded instead of libsass.

You can also use the dartsass-rails gem, a basic command-line integration with the Dart Sass executable from the sass-embedded gem; or dartsass-sprockets gem, an advanced sprockets integration with the Legacy Ruby API from the sassc-embedded gem, to plug smoothly into Ruby on Rails.

Alternately, you can explore using a JS build system with Dart Sass as a JavaScript library.

SassC

Use libsass with Ruby!

This gem combines the speed of libsass, the Sass C implementation, with the ease of use of the original Ruby Sass library.

libsass Version

3.6.1

Installation

Add this line to your application's Gemfile:

ruby
gem 'sassc'

And then execute:

bash
bundle

Or install it yourself as:

bash
gem install sassc

Usage

This library utilizes libsass to allow you to compile SCSS or SASS syntax to CSS. To compile, use a SassC::Engine, e.g.:

ruby
SassC::Engine.new(sass, style: :compressed).render

Note: If you want to use this library with Rails/Sprockets, check out sassc-rails.

Additionally, you can use SassC::Sass2Scss to convert Sass syntax to Scss syntax.

Credits

This gem is maintained by Ryan Boland and awesome contributors.

Changelog

See CHANGELOG.md.

Contributing

Project Setup

  1. Clone repo
  2. Install dependencies - bundle install
  3. Run the tests - bundle exec rake test

Code Changes

  1. Fork it ( https://github.com/sass/sassc-ruby/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature') - try to include tests
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言