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

Error compiling assets #48

Open
maca opened this issue Jun 9, 2015 · 10 comments
Open

Error compiling assets #48

maca opened this issue Jun 9, 2015 · 10 comments

Comments

@maca
Copy link

maca commented Jun 9, 2015

I am using paper elements installed through bower in vendor/assets/components. I've overriden paper-styles by cloning the repo as app/assets/components/paper-styles.
Everything works fine in development but the assets wont compile in production.

 remote:        Sass::SyntaxError: Invalid CSS after "  @apply": expected "}", was "(--layout-scroll);"
 remote:        (in /tmp/build_cdd01b23e7c8daee3206bba40023a2e5/vendor/assets/components/paper-dialog/paper-dialog.html)

Apparently sass is processing the files.

@nonameolsson
Copy link

Does this have anything to do with PolymerElements/paper-drawer-panel#74 ?

@Vortex
Copy link

Vortex commented Jun 30, 2015

I am getting the same issue, it seems that Sass doesn't like that @apply statement.

@nonameolsson
Copy link

So Polymer isn't compatible with Sass at all at the moment?

@alchaplinsky
Copy link
Owner

Yeah, @apply which is known as experimental extension isn't likely to be supported by sass.

@Vortex
Copy link

Vortex commented Jul 3, 2015

Solution? Why are the css files run through sass at all?

@npezza93
Copy link

Any progress on this at all?

@alchaplinsky
Copy link
Owner

@Vortex because rails minifies your css for production and for this purpose uses sass - config.assets.css_compressor = :sass

@alchaplinsky
Copy link
Owner

@npezza93 If sass maintainers would decide to support experimental syntax from polymer team..

@nonameolsson
Copy link

Okey.. So I created a new rails app and installed everything in order from scratch. It worked!
After that I removed everything from the other app I tried to use before. Now it works!

I have no idea, but Sass doesn't seem complain about the @apply anymore.

@Frexuz
Copy link

Frexuz commented Nov 1, 2015

@nonameolsson can you post your gem versions?
I have

gem 'polymer-rails'

group :assets do
  gem 'sass', '3.4.19'
  gem 'sass-rails', '5.0.4'
  gem 'sprockets', '3.4.0'
  gem 'sprockets-rails', '3.0.0.beta2', :require => 'sprockets/railtie'
end

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

No branches or pull requests

6 participants