Raku / doc-website

Tooling to build/run the documentation website
Artistic License 2.0
7 stars 10 forks source link

Inconsistent font size in code samples #417

Open avuserow opened 4 days ago

avuserow commented 4 days ago

Describe the bug

image

Note how the text given is larger than the surrounding text.

I see in the dev tools that there are pretty different font-size rules applied to the control CSS class (1rem) vs the pre element (0.875rem). Disabling that part of the rule makes it look better so I don't think it's an issue with my setup.

To Reproduce Steps to reproduce the behavior: View any page with code, notice that some keywords are larger than others.

Expected behavior

Code is all the same size.

Screenshots

See above.

Desktop (please complete the following information):

Running Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0 on Fedora Linux 40 at a resolution of 1920x1200.

Smartphone (please complete the following information):

Additional context

finanalyst commented 3 days ago

@avuserow thank you for posting this issue. It is an irritating flaw once its been pointed out. The problem is (almost certainly) in the syntax highlighting of code blocks, or rather the CSS associated with span classes within which the words are embedded. Some bad news and good news.

To fix the current problem, without waiting for the new rendering, it will be necessary:

I did look quickly at the SCSS, but it will take rather more time to sort out than I have at this moment.

If you think this needs solving now, your help in finding a consistent fix would be appreciated.

Since there will be new span classes, all of the CSS will need to be changed. The new highlighters classify keywords differently, and there are different categories keywords are put into.