在Sublime文本2中,对于特定主题,我希望属性有一种颜色,值有一种颜色。
background:#FFF url('some/img.png') 10px 10px;
background
__ (属性名称)应该是一种颜色
#FFF url('some/img.png') 10px 10px
_ __ _ (值)应该是另一种颜色(整个值的一种颜色)。< / p>
我知道我必须修改主题颜色集,但任何人都知道如何?
还有一件事,我不希望在冒号之后留空(当击中标签时)
我想要“漂浮:离开;”而不是“浮动:左;”。有谁知道我可以在哪里设置它?
由于
答案 0 :(得分:3)
查看http://tmtheme-editor.herokuapp.com/
这对于元素的样式非常有用..但是如果你喜欢你当前的主题并且你只想编辑CSS中的标签,类,id ...等,那么你必须编辑你正在使用的主题文件..通常这个在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>
当然,您可以填写您喜欢的颜色值
答案 1 :(得分:2)
还不确定颜色属性和值,但是对于css间距我可能有答案。转到C:\Users\<username>\AppData\Roaming\Sublime Text 2\Packages\CSS\css_completions.py
第190行。将l.append((p, p + ": "))
更改为l.append((p, p + ":"))