richthegeek / phpsass

A compiler for SASS/SCSS written in PHP, brought up to date (approx 3.2) from a fork of PHamlP: http://code.google.com/p/phamlp/
http://phpsass.com/
382 stars 83 forks source link

Linear Gradient Mixin Fails #118

Open srsgores opened 11 years ago

srsgores commented 11 years ago

The following code:

@include background(linear-gradient(#5c5c5c, #0f0f0f));

Will fail, and it will produce:

background: -owg(linear-gradient(#5c5c5c, #0f0f0f));
background: -webkit(linear-gradient(#5c5c5c, #0f0f0f));
background: -moz(linear-gradient(#5c5c5c, #0f0f0f));
background: -o(linear-gradient(#5c5c5c, #0f0f0f));

I'm thinking the issue is related to line 30 of Compass.php:

 public static $functions = array(
        'resolve-path',
        'adjust-lightness',
        'scale-lightness',
        'adjust-saturation',
        'scale-saturation',
        'scale-color-value',
        'is-position',
        'is-position-list',
        'opposite-position',
        '-webkit',
        '-moz',
        '-o',
        '-ms',
        '-svg',
        '-pie',
        '-css2',
        'owg',
        'prefixed',
        'prefix',
        'elements-of-type',
        'enumerate',
        'font-files',
        'image-width',
        'image-height',
        'inline-image',
        'inline-font-files',
        'blank',
        'compact',
        '-compass-nth',
        '-compass-list',
        '-compass-list',
        '-compass-space-list',
        '-compass-list-size',
        '-compass-slice',
        'first-value-of',
        'nest',
        'append-selector',
        'headers',
        'pi',
        'sin',
        'cos',
        'tan',
        'comma-list',
        'prefixed-for-transition',
        'stylesheet-url',
        'font-url',
        'image-url'
    );
virgofx commented 11 years ago

There are a few functions that are not defined that are part of the ruby gem which have not been translated. These include: svg/webkit/moz/o/ and prefix.

I just created a custom mixin that just does a straight prefix with no translation that I'm using locally while I wait for this to be implemented.