Skip to content

Releases: johanfriis/obsidian-literate-styles

0.2.0

22 Sep 22:49
Compare
Choose a tag to compare
0.2.0 Pre-release
Pre-release

This release changes quite a lot under the hood, switching out the css transformation to less and postcss.

The two previous libraries in use, sass and zcss, both had issues. Sass grew the bundle to about 5mb and zcss would occasionally output broken css, so after some investigation into css compiler toolchains, I settled on less and postcss. This is a compromise between bundle size, features and speed of compilation, which I think is going to work well going forward.

In addition, all the code fences are now complied in one go, meaning variables can be shared between code fences, and selectors and declarations are merged,

Changed

refactor: switch css renderer to less
refactor: instead of running every single code fence through the less renderer run all the code fences through less at once. This means we only get a render when things are looking good, so styles don't flash in and out when there is a compile error.
chore: change refresh rate interval to 100ms
feat: add postcss combining and sorting of declarations

0.1.2

10 Sep 22:45
Compare
Choose a tag to compare
0.1.2 Pre-release
Pre-release

Changed

  • refactor: 🔥 remove sass in favour of zcss.js

The bundle size of the plugin with sass was more than 4MB. Using zcss.js, it is now down to ~10KB. The plugin loose quite a lot of features that sass gives us, but most of them are very niche and can be replaced by standard css versions. The most important part it gives us is nesting, which is handled fine by zcss.js. So, the tradeoff is acceptable in my opinion. The biggest loss is showing errors, but I expect to be able to use prettier for this in the near future.

0.1.1

05 Sep 21:12
Compare
Choose a tag to compare
0.1.1 Pre-release
Pre-release

Changed

  • 🐛 Saving settings caused new style elements to be added to head

0.1.0

05 Sep 19:55
Compare
Choose a tag to compare
0.1.0 Pre-release
Pre-release

Added

  • ✨ Reference implementation of Literate Styles Obsidian plugin.