rails asset pipeline: Invalid CSS

匿名 (未验证) 提交于 2019-12-03 02:34:02

问题:

I am trying to use http://designshack.net/articles/css/build-an-animated-photo-wall-with-css/ to implement a photo wall in my rails app. I plugged the CSS for list, paragraph and image, with the only changes in image height and width into my custom.css.scss like so:

The asset pipeline throws the following error in that file:

Invalid CSS after "  position:": expected pseudoclass or pseudoelement, was " absolute;" 

Commenting out the position line brings up the next line in the file:

Invalid CSS after "  top:": expected pseudoclass or pseudoelement, was " 0;" 

A syntax problem? Can I not simply put valid css into an scss file? What gives?

回答1:

Try removing whitespaces below the line with text-transform: uppercase;.



回答2:

The problem is in the blank lines! Removed and it does not throw an error. Jeez, blank lines are invalid CSS or SASS???

(The code still doesn't do what it should, but that is an entirely different issue :-)



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!