Home Download Buy Blog Forum Support

CSS syntax highlighting error with media queries

CSS syntax highlighting error with media queries

Postby klm001 on Thu Sep 19, 2013 2:12 pm

It looks like Sublime Text (both 2 and 3) have an issue highlighting CSS media queries if the query is not all on one line.

For example,

Code: Select all
@media only screen and (min-device-width: 600px) and (max-device-width : 1024px) {
   div#desktop {
      display: none;
   }
}

highlights just fine while the following does not:

Code: Select all
@media only screen and (min-device-width: 600px)
and (max-device-width : 1024px) {
   div#desktop {
      display: none;
   }
}
klm001
 
Posts: 1
Joined: Thu Sep 19, 2013 2:05 pm

Re: CSS syntax highlighting error with media queries

Postby Babelfisch on Wed Feb 05, 2014 1:43 pm

The problem still exists. If the opening bracket is on the next line, the syntax highlighting does not work:

Image
https://www.dropbox.com/s/xs9pth9cm5rsohh/Screenshot%202014-02-05%2013.32.16.png

Image
https://www.dropbox.com/s/qh8vpm7c4y4bj7s/Screenshot%202014-02-05%2013.32.50.png
Babelfisch
 
Posts: 2
Joined: Sun Dec 29, 2013 2:51 pm

Re: CSS syntax highlighting error with media queries

Postby marcus on Wed Feb 26, 2014 5:33 am

check out a similar (the same?) issue on github:

https://github.com/MarioRicalde/SCSS.tmbundle/issues/145

Image
marcus
 
Posts: 5
Joined: Tue Dec 18, 2012 4:01 pm

Re: CSS syntax highlighting error with media queries

Postby thepixelworx on Tue Jul 29, 2014 9:07 am

Hi, just in case people are still have this issue with multi-line media queries not having the correct syntax highlighting in Sublime Text, there is a package available called CSS3 available from the package installer, (CTRL+ SHIFT + P > Install > CSS3); it does the trick.
thepixelworx
 
Posts: 1
Joined: Tue Jul 29, 2014 9:05 am


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 15 guests