2012-10-09 96 views
2

在Sublime text 2中,對於特定的主題,我想爲該屬性指定一種顏色,爲該值指定一種顏色。Sublime Text 2 css顏色

background:#FFF url('some/img.png') 10px 10px; 

background__(屬性名)應該是一個彩色

#FFF url('some/img.png') 10px 10px_ __ _(值)應該是另一種顏色(一種顏色用於整個值) 。

我知道我必須修改主題顏色集,但任何人有任何想法如何?

而另一件事情,我不想冒號後的空間(當敲標籤)

我想「浮動:左;」而不是「float:left;」。有誰知道我可以在哪裏設置?

感謝

回答

2

不知道什麼顏色的屬性和值還,但對於CSS間距我可能有一個答案。轉到C:\Users\<username>\AppData\Roaming\Sublime Text 2\Packages\CSS\css_completions.py線190更改l.append((p, p + ": "))l.append((p, p + ":"))

3

檢查了這一點http://tmtheme-editor.herokuapp.com/ 這是你的風格元素。但是,如果你喜歡你目前的主題,你只需要編輯的標籤,類,ID是非常有用的.. 。等在CSS,那麼你必須編輯您使用的主題文件。一般這是Sublime Text 2\Packages\Color Scheme - Default\skin-name

之後,你必須編輯或添加,如果他們不存在下列規則:

<dict> 
     <key>name</key> 
     <string>css tag-name</string> 
     <key>scope</key> 
     <string>meta.selector.css entity.name.tag</string> 
     <key>settings</key> 
     <dict> 
      <key>foreground</key> 
      <string>#9EFFFF</string> 
     </dict> 
    </dict> 
    <dict> 
     <key>name</key> 
     <string>css#id</string> 
     <key>scope</key> 
     <string>meta.selector.css entity.other.attribute-name.id</string> 
     <key>settings</key> 
     <dict> 
      <key>foreground</key> 
      <string>#FFB454</string> 
     </dict> 
    </dict> 
    <dict> 
     <key>name</key> 
     <string>css.class</string> 
     <key>scope</key> 
     <string>meta.selector.css entity.other.attribute-name.class</string> 
     <key>settings</key> 
     <dict> 
      <key>foreground</key> 
      <string>#5FE461</string> 
      <key>fontStyle</key> 
      <string> underline</string> 
     </dict> 
    </dict> 
    <dict> 
     <key>name</key> 
     <string>css property-name:</string> 
     <key>scope</key> 
     <string>support.type.property-name.css</string> 
     <key>settings</key> 
     <dict> 
      <key>foreground</key> 
      <string>#9DF39F</string> 
     </dict> 
    </dict> 
    <dict> 
     <key>name</key> 
     <string>css property-value;</string> 
     <key>scope</key> 
     <string>meta.property-group support.constant.property-value.css, meta.property-value support.constant.property-value.css</string> 
     <key>settings</key> 
     <dict> 
      <key>foreground</key> 
      <string>#F6F080</string> 
     </dict> 
    </dict> 
    <dict> 
     <key>name</key> 
     <string>css @at-rule</string> 
     <key>scope</key> 
     <string>meta.preprocessor.at-rule keyword.control.at-rule</string> 
     <key>settings</key> 
     <dict> 
      <key>foreground</key> 
      <string>#F6AA11</string> 
     </dict> 
    </dict> 
    <dict> 
     <key>name</key> 
     <string>css additional-constants</string> 
     <key>scope</key> 
     <string>meta.property-value support.constant.named-color.css, meta.property-value constant</string> 
     <key>settings</key> 
     <dict> 
      <key>foreground</key> 
      <string>#EDF080</string> 
     </dict> 
    </dict> 
    <dict> 
     <key>name</key> 
     <string>css constructor.argument</string> 
     <key>scope</key> 
     <string>meta.constructor.argument.css</string> 
     <key>settings</key> 
     <dict> 
      <key>foreground</key> 
      <string>#EB939A</string> 
     </dict> 
    </dict> 

和當然你可以填寫在數值中你喜歡什麼顏色