alchaplinsky/polymer-rails

Error compiling assets

Opened this issue · 10 comments

maca commented

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.

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

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

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

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

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

Any progress on this at all?

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

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

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.

@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