Closed joelatschool closed 7 months ago
It seems like make_styles.py
is assuming that every css rule will begin with .theorem-callout
, but this rule breaks that:
Easiest fix that isn't a hack but also doesn't require actually parsing the css or switching to an actual preprocessor might be using nesting, although I don't know if it's supported by Obsidian's electron version or w/e.
Thanks a ton for spotting this! It should be fixed in the latest release 2.0.0-beta10.
And yeah, make_styles.py
was indeed one of the dirtiest codes contained in this repository, written back when I had just started this whole web-ish stuff (js/ts/css)...
I've decided to rewrite it using Sass. (I started learning it just today!)
By the way, I had separated theorem styling CSS into separate files in order to make each of them serve as a sample CSS snippet for users who aren't familiar with CSS (like me).
(e.g. https://github.com/RyotaUshio/obsidian-math-booster/blob/2.0.0-beta9/styles/framed.css)
Now, each CSS file cannot be used as a CSS snippet as is, because it's now .scss
file containing @mixin
:
https://github.com/RyotaUshio/obsidian-math-booster/blob/2.0.0-beta10/styles/framed.scss
By any chance do you know how to construct a single styles.css
file from the separate CSS files, each of which doesn't contain @mixin
, so that each CSS file for a preset style can be used as a stand-alone CSS snippet?
I'm using beta9 and I noticed that somehow the rule linked below:
https://github.com/RyotaUshio/obsidian-math-booster/blob/6f20179380552398001877361076951a7d278e06/styles/framed.css#L21
Is generating a CSS rule
which does not target
.theorem-callout-framed
.