From 368e3d6d923a27189e07c1e2e4d3b33b5bfbecdd Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 2 Jun 2021 15:13:34 +1000 Subject: [PATCH] fix styling changes not updating preview regression caused by 050ef11a962a480a3616fc952961b036e0a2cb7a --- pylib/anki/template.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pylib/anki/template.py b/pylib/anki/template.py index 816ee376f..eb57d6e5d 100644 --- a/pylib/anki/template.py +++ b/pylib/anki/template.py @@ -252,6 +252,9 @@ class TemplateRenderContext: template=to_json_bytes(self._template), fill_empty=self._fill_empty, ) + # when rendering card layout, the css changes have not been + # committed; we need the current notetype instance instead + out.css = self._note_type["css"] else: # existing card (eg study mode) out = self._col._backend.render_existing_card(