Permalink
Browse files

Stop meta match for @media at its opening bracket and include in symb…

…ols list
  • Loading branch information...
1 parent 332418f commit 10fca09377f79ba9e76aa85d0f9978cae53f8a92 @joshvarner joshvarner committed Dec 8, 2010
Showing with 43 additions and 26 deletions.
  1. +2 −2 Preferences/Symbol list.tmPreferences
  2. +41 −24 Syntaxes/CSS.plist
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Symbol List: Selector</string>
<key>scope</key>
- <string>source.css meta.selector</string>
+ <string>source.css meta.selector, source.css meta.at-rule.media</string>
<key>settings</key>
<dict>
<key>showInSymbolList</key>
View
@@ -177,25 +177,7 @@
</dict>
<dict>
<key>begin</key>
- <string>^\s*((@)media)(?=.*?\{)</string>
- <key>captures</key>
- <dict>
- <key>1</key>
- <dict>
- <key>name</key>
- <string>keyword.control.at-rule.media.css</string>
- </dict>
- <key>2</key>
- <dict>
- <key>name</key>
- <string>punctuation.definition.keyword.css</string>
- </dict>
- <key>3</key>
- <dict>
- <key>name</key>
- <string>support.constant.media.css</string>
- </dict>
- </dict>
+ <string>(?=^\s*@media\s*.*?\{)</string>
<key>end</key>
<string>\s*(\})</string>
<key>endCaptures</key>
@@ -206,17 +188,52 @@
<string>punctuation.section.property-list.css</string>
</dict>
</dict>
- <key>name</key>
- <string>meta.at-rule.media.css</string>
<key>patterns</key>
<array>
<dict>
- <key>include</key>
- <string>#media-query-list</string>
+ <key>begin</key>
+ <string>^\s*((@)media)(?=.*?\{)</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>keyword.control.at-rule.media.css</string>
+ </dict>
+ <key>2</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.definition.keyword.css</string>
+ </dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>support.constant.media.css</string>
+ </dict>
+ </dict>
+ <key>end</key>
+ <string>\s*(?=\{)</string>
+ <key>name</key>
+ <string>meta.at-rule.media.css</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>include</key>
+ <string>#media-query-list</string>
+ </dict>
+ </array>
</dict>
<dict>
<key>begin</key>
- <string>\{</string>
+ <string>\s*(\{)</string>
+ <key>beginCaptures</key>
+ <dict>
+ <key>1</key>
+ <dict>
+ <key>name</key>
+ <string>punctuation.section.property-list.css</string>
+ </dict>
+ </dict>
<key>end</key>
<string>(?=\})</string>
<key>patterns</key>

0 comments on commit 10fca09

Please sign in to comment.