Skip to content

Commit

Permalink
Removed explicit encoding parameters ( support for ruby 1.9/sass 3.1.14)
Browse files Browse the repository at this point in the history
When running on Ruby 1.9 and later, Sass is aware of the character
encoding of documents and will handle them the same way that CSS would.
  • Loading branch information
theoreticaLee committed Feb 9, 2012
1 parent 738be44 commit 1a0b95b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
5 changes: 5 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,18 @@ You should run the `sass:compile` task instead in order to re-generate your css

* sfSassyCssPlugin has been created by [Victor Berchet](https://github.com/vicb)
* The inspiration and some parts of the code comes from [sfLESSPlugin](https://github.com/everzet/sfLESSPlugin) by [Kudryashov Konstantin](http://everzet.com)
* Added Ruby 1.9+ support [Lee Leathers] (https://github.com/theoreticaLee)

## Tips ##

You can use `sass-convert` to help you convert less stylesheets to sass.

##Changelog ##

### v0.1.2 - 2012-02-08 ###

* Fix to support Ruby 1.9+

### v0.1.1 - 2010-08-27 ###

* Fix for windows tested on win 7
Expand Down
4 changes: 2 additions & 2 deletions config/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ all:
line_numbers: false # Emit comments in the generated CSS indicating the corresponding sass line.
line_comments: false
toolbar: false # Wether to display the debug toolbar
encoding: UTF-8 # Sass files default encoding
encoding: null # Sass files default encoding ( Only supported for legacy Ruby versions. If you are using Ruby 1.9 or later, Sass will implicitly set this. )

dev:
sfSassyCssPlugin:
enabled: true # Wether to trigger sass compilation
style: expanded # Output style: nested, compact, compressed, or expanded.
toolbar: true # Wether to display the debug toolbar
toolbar: true # Wether to display the debug toolbar
5 changes: 4 additions & 1 deletion lib/sass/sfSassCompilerDefault.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ protected function getParameters()
$params[] = sprintf('--style %s', sfConfig::get('app_sfSassyCssPlugin_style'));

// encoding
$params[] = sprintf('-E "%s"', sfConfig::get('app_sfSassyCssPlugin_encoding'));
if(sfConfig::get('app_sfSassyCssPlugin_encoding') !== null)
{
$params[] = sprintf('-E "%s"', sfConfig::get('app_sfSassyCssPlugin_encoding'));
}

// debug
if (sfConfig::get('app_sfSassyCssPlugin_trace'))
Expand Down
7 changes: 5 additions & 2 deletions lib/task/sassCompileTask.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ protected function execute($arguments = array(), $options = array())
$compiler->clean($in, $out);
}

$params[] = '--no-cache';
$params[] = sprintf('-E "%s"', sfConfig::get('app_sfSassyCssPlugin_encoding', "UTF-8"));
$params[] = '--no-cache';
if(sfConfig::get('app_sfSassyCssPlugin_encoding') !== null)
{
$params[] = sprintf('-E "%s"', sfConfig::get('app_sfSassyCssPlugin_encoding'));
}

if ($options['format'] == 'scss')
{
Expand Down

0 comments on commit 1a0b95b

Please sign in to comment.