badlydrawnrob / anki

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

Fix some minor css issues #81

Closed badlydrawnrob closed 3 weeks ago

badlydrawnrob commented 8 months ago

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

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

Other things:

New functionality?

Back to the start ... priority changes

Some not-so-essential changes

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 commented 8 months ago
Screenshot 2024-01-14 at 19 27 43
badlydrawnrob commented 8 months ago
Screenshot 2024-01-17 at 17 22 05
badlydrawnrob commented 8 months ago
Screenshot 2024-01-20 at 21 18 49
badlydrawnrob commented 8 months ago
Screenshot 2024-01-20 at 21 42 24
badlydrawnrob commented 8 months ago

Inline code isn't standout enough!

Screenshot 2024-01-21 at 14 14 16
badlydrawnrob commented 3 weeks ago

Most of these are fixed now