# Docs for Custom Styling v0.0.1
by pykong
(ST v3153)
## Example Code
```
...
"styles": [
{
"foreground": "#DDB700",
"icon": "circle",
"mark_style": "outline",
"types": [
"warning"
]
},
{
"foreground": "#66FFFF",
"background": "#9966FF",
"icon": "circle",
"mark_style": "stippled_underline",
"codes": [
"F401",
"F402"
]
},
{
"scope": "sublimelinter.mark.error",
"icon": "Packages/User/cross.png",
"mark_style": "stippled_underline",
"codes": [
"D300",
"D303"
],
"types": [
"warning"
]
},
{
"foreground": "#DDB700",
"icon": "dot",
"mark_style": "fill",
"codes": [
"F900"
],
"priority": 3
}
]
...
```
## Explanation
### Where to put the style definitions?
- Base level of the settings: Define styles for the defaults: "warning" and "error"
- Under each linter definition: Define styles for warnings and errors of that linter.
### What to put into the definitions?
### 1. Define targets:
- Either a list of error codes: ``` "codes": ["F401", "F402", ... ]" ```
- Warning or error type: ``` "types": ["warning", "error"]" ```
*Both "codes" and "types" can be combined.*
### 2. Define color:
##### a) State scope to source from
``` "scope":"python.source.punctuation" ```
##### b) Give explicit color definitions
```
"foreground": "#66FFFF",
"background": "#9966FF"
```
**Note:** Format in hex, leading `#` is no longer to be omitted.
Other color formats supported by `.sublime-color-scheme` should work also. _(Untested)_
*User either a) or b) as __scope__ will always overwrite other definitions.*
### 3. Define mark style:
``` "mark_style": "stippled_underline"```
Valid keys: `"outline", "fill", "solid_underline", "squiggly_underline", "stippled_underline", "none"`
**Note:** `snake_case` is now used instead of `word case` to be consistent with ST's vocabulary.
### 4. Define icon:
Valid keys: `"circle", "dot", "bookmark"`
A relative path to a png file will also work:
```"icon": "Packages/User/cross.png"```
### 5. Define gutter priority _(Untested)_
Set an overwrite order: ```"priority": 3```
A rule with a higher count will replace the gutter icon of a rule with a lower one on the same line. **But** errors will always overwrite warnings.