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: Invalid CSS after #2376

Closed
chenxiaochun opened this issue May 11, 2017 · 6 comments
Closed

Error: Invalid CSS after #2376

chenxiaochun opened this issue May 11, 2017 · 6 comments

Comments

@chenxiaochun
Copy link

chenxiaochun commented May 11, 2017

code demo

.test {
	background :url(//img12.360buyimg.com/da/jfs/t1708/343/1355811714/2006/812516d1/55e511a9N42e564c7.jpg) no-repeat left center;
	.a{
		width: 235px;
		height: 100px;
	}
}

When i write css code like above, it will be throw exception:

[11:14:16] ERROR Error: Invalid CSS after "	.a": expected ")", was "{"
        on line 3 of css/popupNotice.scss
>> 	.a{
   -^

But, if i write one of the following is ok.
1、 add http protocol

.test {
	background :url(http://img12.360buyimg.com/da/jfs/t1708/343/1355811714/2006/812516d1/55e511a9N42e564c7.jpg) no-repeat left center;
	.a{
		width: 235px;
		height: 100px;
	}
}

2、add another css selector below of the background

.test {
	background :url(http://img12.360buyimg.com/da/jfs/t1708/343/1355811714/2006/812516d1/55e511a9N42e564c7.jpg) no-repeat left center;
	width: 200px;
	.a{
		width: 235px;
		height: 100px;
	}
}

3、wrap the whole http inside

.test {
	background :url("//img12.360buyimg.com/da/jfs/t1708/343/1355811714/2006/812516d1/55e511a9N42e564c7.jpg") no-repeat left center;
	.a{
		width: 235px;
		height: 100px;
	}
}

information

  • NPM version (npm -v):
v4.1.2
  • Node version (node -v):
v4.4.5
  • Node Process (node -p process.versions):
{ 
  http_parser: '2.5.2',
  node: '4.4.5',
  v8: '4.5.103.35',
  uv: '1.8.0',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  icu: '56.1',
  modules: '46',
  openssl: '1.0.2h' 
}
  • Node Platform (node -p process.platform):
darwin
  • Node architecture (node -p process.arch):
x64
  • node-sass version (node -p "require('node-sass').info"):
node-sass	3.13.1	(Wrapper)	[JavaScript]
libsass  	3.3.6	(Sass Compiler)	[C/C++]
  • npm node-sass versions (npm ls node-sass):
jdfx@3.1.7 /Users/chenxiaochun/Documents/MyProject/jdf
└── node-sass@3.13.1
@nschonni
Copy link
Collaborator

Can you reproduce this with the latest node-sass? 3.13 is using an older libsass

@chenxiaochun
Copy link
Author

There are also problems with the latest version.

@JohnMica
Copy link

if you wrap the whole http inside "http://img12.360buyimg.com/da/jfs/t1708/343/1355811714/2006/812516d1/55e511a9N42e564c7.jpg" does it work ?

@chenxiaochun
Copy link
Author

Yes, it's running well.

@xzyfer
Copy link
Contributor

xzyfer commented May 16, 2017

I can confirm this is an issue with LibSass master.

@mgreter
Copy link
Contributor

mgreter commented May 20, 2017

This is a duplicate of #2123 and fixed by #2387

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

5 participants