2015-09-13 216 views
1

我有一個文件,這個代碼:Sublime Text 2中突出顯示的顏色是什麼意思?

background: -moz-linear-gradient(red, orange, yellow, green, blue, indigo, violet); 

崇高文本2似乎突出indigoviolet用淡藍色的背景:

SCREENSHOT

我已經試過了一些更多的顏色,其中大多數像chocolate,aliceblue,pink等得到突出顯示,但其他一些喜歡maroon,teal,silver等沒有。

藍色突出顯示是什麼意思?

回答

1

這些"Extended color keywords"

X11顏色[X11COLORS]支持流行的瀏覽器與灰色/灰色變體的從SVG 1.0添加 。得到的清單恰好是 與SVG 1.0 color keyword names相同。本規範 將其定義擴展到SVG之外。

CSS.tmLanguage的相關部分:

support.constant.color.w3c標準色-name.css

... 
<dict> 
<key>color-values</key> 
<dict> 
    <key>patterns</key> 
    <array> 
     ... 
     <dict> 
      <key>comment</key> 
      <string>These colours are mostly recognised but will not validate. ref: http://www.w3schools.com/css/css_colornames.asp</string> 
      <key>match</key> 
      <string>\b(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato|turquoise|violet|wheat|whitesmoke|yellowgreen)\b</string> 
      <key>name</key> 
      <string>invalid.deprecated.color.w3c-non-standard-color-name.css</string> 
     </dict> 
     ... 
    </array> 
</dict> 
... 

不同外觀通過作用域引起(用於標準顏色關鍵字)
invalid.deprecated.color.w3c-non-standard-color-name.css(用於擴展顏色關鍵字)

+0

謝謝。什麼是CSS.tmLanguage? –

+0

@CoolGuy它是Sublime Text的默認CSS語法定義。該文件通常位於軟件包中。 – vaultah

相關問題