Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is not working with symfony filter scssphp #7

Closed
tniemann opened this issue Jul 23, 2016 · 3 comments
Closed

is not working with symfony filter scssphp #7

tniemann opened this issue Jul 23, 2016 · 3 comments

Comments

@tniemann
Copy link

tniemann commented Jul 23, 2016

I try to get this runnning in Symfony 3.1.2 with the assetic watcher for scss (scssphp).

{% stylesheets filter="scssphp" output="/assets/css/style.css"
            "@AppBundle/Resources/sass/style.scss"
        %}
        <link rel="stylesheet" href="{{ asset_url }}" />
        {% endstylesheets %}

Here is the code i run:

$nav-font-size: 15px;
@include rem((
          font-size: $nav-font-size
  ));

and this is what comes out:

font-size:15px;
font-size:0.00977rem

My rem-baseline is:

$rem-baseline: 16px;

Any idea what cause this?

Regards
Thomas

@pierreburel
Copy link
Owner

pierreburel commented Jul 24, 2016

Hi,

I pushed a fix on a fix/scssphp branch: let me know if it resolves your issue.

I'm not quite sure I want to support such unofficial ports of Sass (without unit testing at least), so I'll think about merging this eventually.

@tniemann
Copy link
Author

tniemann commented Jul 24, 2016

Hi,

yes works now.
What do you mean with "unofficial ports of Sass".
This filter is what symfony officila recommends on there webiste.

http://symfony.com/doc/current/cookbook/assetic/php.html

Thanks,
Thomas

@pierreburel
Copy link
Owner

pierreburel commented Jul 24, 2016

Symfony recommends https://github.com/leafo/scssphp which is PHP compiler.
The only official Sass compilers are written in Ruby and C/C++ (libsass) : https://github.com/sass
Since this compiler is not supported by the Sass team, it could have some bugs and not all the features in Sass and libsass (I'm pretty sure the ones I fixed are bugs since it works on both official compilers).

I would rather recommend using something like Gulp/Grunt (and node-sass) to compile your .scss files to .css, but it would sure be less integrated with Symfony. Or maybe something like https://github.com/GollumSF/libsass-bundle ?

Anyway, I'm glad this fixed your issue for now, and thanks for using sass-rem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants