atom / language-css

CSS package for Atom
Other
59 stars 84 forks source link

Fix #160 #161

Closed octref closed 5 years ago

octref commented 5 years ago

Requirements

Description of the Change

As seen in #160, the following code won't be highlighted properly:

@value foo;
.foo

This is caused by my change in #142 to eagerly parse a block of {} in custom at-rules. My change introduce a new rule that specifically handle single-line custom at-rules ending with ;.

Alternate Designs

n/a

Benefits

Before:

image

After:

image

Possible Drawbacks

Before:

image

After:

image

Although @import-file.css is not valid CSS, I think parsing the @import-file part as at-rule follows the spec closer than original behavior.

Applicable Issues

160.