# Make all \`HighlightStyle\` properties optional · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/fbf7cdf4f2b6845f8ef20963e9874026f86ca249)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: fbf7cdf4f2b6845f8ef20963e9874026f86ca249

Requested commit: fbf7cdf4f2b6845f8ef20963e9874026f86ca249

Commit: fbf7cdf4f2b6845f8ef20963e9874026f86ca249

Tree: 8bd4cfa9c07902666d929fba97b82186832307a9

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Make all `HighlightStyle` properties optional

Previously, some of those properties such the font weight, style and color
would be mandatory: when the theme didn't specify them, Zed would use a default
value during deserialization. This meant that those default properties would
unconditionally override the base text style, causing a rendering bug when
combining syntax highlights with diagnostic styles.

This commit fixes that by making `HighlightStyle`s more additive: each property
can be set independently and only the properties that theme specifies get
overridden in the base text style.

```

## Parents

- [72692f1700ce1974ac47884835bac10bb4cef436](https://git.cafe/gitcafe/zed/commit/72692f1700ce1974ac47884835bac10bb4cef436?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/fbf7cdf4f2b6845f8ef20963e9874026f86ca249?format=markdown)
