samedi 25 juin 2016

What would cause a sass file to break compilation due to a line break?

I have a sass file: sitemap.scss It contains only the following (for now): .hero { height: 600px; background: none; } I'm using gulp-sass which has, up until now, compiled my sass perfectly fine. The output error when compiling this file reads as such: Error in plugin 'gulp-sass' Message: assets/styles/source/components/sub-pages/sitemap.scss Error: Invalid CSS after ".hero {": expected "}", was "{" on line 1 of assets/styles/source/components/sub-pages/sitemap.scss >> .hero { { -------^ Details: formatted: Error: Invalid CSS after ".hero {": expected "}", was "{" on line 1 of assets/styles/source/components/sub-pages/sitemap.scss >> .hero { { -------^ column: 8 line: 1 file: /Users/dvasquez/Sites/workspace/Development/KBHome.com-branch3/KBHome.com/assets/styles/source/components/sub-pages/sitemap.scss status: 1 messageFormatted: assets/styles/source/components/sub-pages/sitemap.scss Error: Invalid CSS after ".hero {": expected "}", was "{" on line 1 of assets/styles/source/components/sub-pages/sitemap.scss >> .hero { { -------^ messageOriginal: Invalid CSS after ".hero {": expected "}", was "{" relativePath: assets/styles/source/components/sub-pages/sitemap.scss Now here's where it gets odd. If I take that same sass file, and write it like this: .hero { height: 600px; background: none; } It compiles just fine. I assumed this might be an encoding issue of some sort, so I deleted the file and created a fresh one. Same issue. Has anyone encountered anything like this before? I have many other sass files in my project and none of them exhibit this behavior. Also, in addition to this, I also tried importing a partial which included the 4-line version of the file and that worked just fine as well. Any ideas would be greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire