Fails to @import when the semicolon is missing #761

Closed
dg opened this Issue Apr 10, 2012 · 6 comments

Comments

Projects
None yet
5 participants
@dg

dg commented Apr 10, 2012

This single line style

@import 'reset.less'

without semicolon do nothing. No file is imported and no error message is omitted.

@fcelda

This comment has been minimized.

Show comment
Hide comment
@fcelda

fcelda Apr 10, 2012

I tried with both less 1.2.0 and 1.3.0. It works for me, an error message is emitted.

$ lessc bar.less 
ParseError: Syntax Error on line 1 in /tmp/bar.less:1:0
1 @import "reset.less"
2 

fcelda commented Apr 10, 2012

I tried with both less 1.2.0 and 1.3.0. It works for me, an error message is emitted.

$ lessc bar.less 
ParseError: Syntax Error on line 1 in /tmp/bar.less:1:0
1 @import "reset.less"
2 
@dg

This comment has been minimized.

Show comment
Hide comment
@dg

dg Apr 11, 2012

I found it in 1.3.0 on Windows. File must be empty, only with single @import rule.

dg commented Apr 11, 2012

I found it in 1.3.0 on Windows. File must be empty, only with single @import rule.

@fcelda

This comment has been minimized.

Show comment
Hide comment
@fcelda

fcelda Apr 11, 2012

You are right. More general: The file is not imported and no error message shows up when the @import rule without semicolon termination is the last rule in the input file.

fcelda commented Apr 11, 2012

You are right. More general: The file is not imported and no error message shows up when the @import rule without semicolon termination is the last rule in the input file.

@philgran

This comment has been minimized.

Show comment
Hide comment
@philgran

philgran May 9, 2012

Excluding the semicolon after an @import rule is not valid CSS syntax.

http://www.w3.org/TR/css3-syntax/#at-rule

Just add the semicolon.

philgran commented May 9, 2012

Excluding the semicolon after an @import rule is not valid CSS syntax.

http://www.w3.org/TR/css3-syntax/#at-rule

Just add the semicolon.

@fcelda

This comment has been minimized.

Show comment
Hide comment
@fcelda

fcelda May 10, 2012

Yes, it isn't valid. But this issue is about lessc not reporting the problem.

fcelda commented May 10, 2012

Yes, it isn't valid. But this issue is about lessc not reporting the problem.

@corpix

This comment has been minimized.

Show comment
Hide comment
@corpix

corpix May 21, 2012

Annoying bug!

corpix commented May 21, 2012

Annoying bug!

@lukeapage lukeapage closed this in 8c6d14b Aug 11, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment