Skip to content

Commit

Permalink
Document all supported SassC::Engine options
Browse files Browse the repository at this point in the history
  • Loading branch information
ntkme committed Jul 19, 2024
1 parent 1f3279a commit 3f7568c
Showing 1 changed file with 32 additions and 11 deletions.
43 changes: 32 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,38 @@ require 'sassc-embedded'
SassC::Engine.new(sass, style: :compressed).render
```

See [rubydoc.info/gems/sassc](https://rubydoc.info/gems/sassc) for full API documentation.

## Behavioral Differences from SassC Ruby

1. Option `:style => :nested` and `:style => :compact` behave as `:style => :expanded`.

2. Option `:precision` is ignored.

3. Option `:line_comments` is ignored.

See [the dart-sass documentation](https://github.com/sass/dart-sass#behavioral-differences-from-ruby-sass) for other differences.
Most of the original `sassc` options are supported with no behavior difference unless noted otherwise:

- `:filename`
- `:quiet`
- ~~`:precision`~~ - ignored
- ~~`:line_comments`~~ - ignored
- `:syntax`
- `:source_map_embed`
- `:source_map_contents`
- `:omit_source_map_url`
- `:source_map_file`
- `:importer`
- `:functions`
- `:style` - ~~`:nested`~~ and ~~`:compact`~~ behave as `:expanded`
- `:load_paths`

See [`sassc-ruby` source code](https://github.com/sass/sassc-ruby/blob/master/lib/sassc/engine.rb) and [`libsass` documentation](https://github.com/sass/libsass/blob/master/docs/api-context.md) for details.

Additional `sass-embedded` options are supported:

- `:charset`
- `:importers`
- `:alert_ascii`
- `:alert_color`
- `:fatal_deprecations`
- `:future_deprecations`
- `:logger`
- `:quiet_deps`
- `:silence_deprecations`
- `:verbose`

See [`sass-embedded` documentation](https://rubydoc.info/gems/sass-embedded/Sass#compile_string-class_method) for details.

## Troubleshooting

Expand Down

0 comments on commit 3f7568c

Please sign in to comment.