anki icon indicating copy to clipboard operation
anki copied to clipboard

Fix some minor css issues

Open badlydrawnrob opened this issue 1 year ago • 5 comments

Add useful CSS to this gist

Some minor changes with font-size and possibly additional styles for Markdown checkboxes. I'm using some edits of the original Print First CSS due to Verdana font being a bit too big at default --font-size.

Note: make sure rem is behaving properly (i.e. not inflating the font size with child elements)

Start here ...

Some very old CSS changes

  • [x] #23

code blocks

Some way to quickly spot a piece of code we're talking about (like the cloze deletion css) It shouldn't be difficult to add (searching for a specific line of code once compiled is too slow)

Some rough tests here

  • [x] #132 (duplicate #131) (write it manually, don't use the button)
  • [x] #130
  • [x] #125
  • [x] #129

Other things:

  • [ ] Make code block smaller --font-size when viewed in AnkiMobile? (There's a lot of scrolling involved)
  • [ ] #121
  • [ ] Wrap inline code so it doesn't break layout
  • [ ] #66
    • [ ] Scrap img inside code block?
    • [ ] It can be useful for speed (take a snapshot and use that)

New functionality?

  • [ ] #40 (multiple choice)
    • [ ] Style checkboxes
    • [x] To look like
    • [ ] Multiple choice

Back to the start ... priority changes

Some not-so-essential changes

  • [ ] We have <i> and <b> but there's also <mark>

Some rem tests

rem only calculates from the default font-size which is set in :root (the --font-size variables are set in print-first-css (or override in anki themes) @ style/modules/variables/typography.less. Tested in Codepen[^2] — more rem notes

Before After
image image

testing-rem-sizes-cascading Screenshot 2024-01-03 at 22 34 11 Screenshot 2024-01-03 at 22 40 04

More examples of --font-size issues:

Screenshot 2023-12-24 at 22 10 46 Screenshot 2023-12-24 at 22 11 00

[^1]: The code is currently doing some (slightly odd) font reduction as Verdana was too big at the root font-size. [^2]: There is the question whether :root is the correct element to set the base font-size, perhaps html element is more appropriate, but fuck it, it seems to work fine. According to this root is practically the same as html

badlydrawnrob avatar Dec 24 '23 22:12 badlydrawnrob