# Make notebook cells follow global font and markdown styling \(\#57567\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 2bba4e2220b105a77ed19e941b408dff977ae01d

Requested commit: 2bba4e2220b105a77ed19e941b408dff977ae01d

Commit: 2bba4e2220b105a77ed19e941b408dff977ae01d

Tree: 2e833ed242896bcddb99c59ecfd0de6c8457fcc7

Author: JannikRosendahl

Committer: GitHub

## Message

```
Make notebook cells follow global font and markdown styling (#57567)

Notebook cells are currently not responding to changes in font-family
(`zed://settings/buffer_font_family`) and font-size
(`zed://settings/buffer_font_size`).

Currently, `MarkdownCell` and `CodeCell` create and set a
`TextStyleRefinement` on their `Editor`, creating copies of font-family
and font-size in the process. As a result, these do not get updated when
the global font-family or font-size change.
By not setting the refinement manually and letting the editor handle
these value instead, these values get updated when the global settings
change.

This behaviour is consistent with how the inline repl already behaves
and in my opinion is according to the users expectations.


After Review: this PR changes the rendered preview of MarkdownCells to
use the themed MarkdownStyle instead of an empty Markdown Style



Before:


https://github.com/user-attachments/assets/e70b9346-8fa1-4d66-aa85-07e987c56ff2

After:


https://github.com/user-attachments/assets/4957e20e-9b5b-4cb9-a9df-3b33538bc686



Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
  - not sure if this needs test or how they should look like...
- [x] Performance impact has been considered and is acceptable

~~Closes #ISSUE~~

Release Notes:

- Fixed notebook cells not responding to appearance settings changes
```

## Parents

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

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