badlydrawnrob / anki

Learn to code with Anki — flashcards and themes for all learning levels. Master your programming language of choice!
MIT License
719 stars 61 forks source link

Someday compile `skylighting.less` from a `json` file? #95

Closed badlydrawnrob closed 2 months ago

badlydrawnrob commented 8 months ago

I don't think this is realistic. It's simpler to just copy the styles and hardcode them!

  1. Look through the compiled CSS that comes with the base html template
  2. Check for things like span.smallcaps and div.columns — can it be safely deleted?[^1]
  3. How difficult is it to reason about different colour themes?
  4. Make sure at least the two default skylighting.less themes are correct

This may or may not happen someday in the future. Feel free to try yourself and submit a pull request in the meantime! Pandoc generates the CSS for the Skylighting code highlighter with a json file.

Skylighting — could do better

This article outlines some problems with Skylighting Below are examples of Pandoc's highlighting (1) This is compared with Visual Studio Code (2)

Function <span class="fu"> is too generic

Screenshot 2024-01-30 at 21 37 17 Screenshot 2024-01-30 at 21 38 17

Parentheses aren't styled (no <span> wrapper)

Screenshot 2024-02-01 at 14 41 27

[^1]: Some things like the .task-list could come in very handy (and may need extending #40)

badlydrawnrob commented 2 months ago

Closing this out. Just use CSS classes.