-
Notifications
You must be signed in to change notification settings - Fork 502
Better tables in examples #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Even fancier: like the scripts we use to create the examples, maybe there's a way to script creating those images (if we end up using images) |
I guess a monospaced webfont which includes the box-drawing characters would work. |
My favourite monospace fonts are Source Code Pro and Fira Code. Source Code Pro: Fira Code: Source Code Pro: Fira Code: I especially like Fira Code because it has fancy ligatures (disabled by default, can be enabled with I'd be happy to make a PR to include a font :) |
@Aloso - if you include the font, does it work across browsers/platforms? I assume so, but figured I'd ask just to be sure |
Either font works for me. I like the fira one in the logo, though having the unbroken table lines with Source Code Pro is also nice |
The line is only that way because I zoomed before taking the screenshot :D It depends on the font size. I'll pick Source Code Pro, then. |
@Aloso sounds good |
@jonathandturner I tried this on my phone. To my surprise using one of these fonts doesn't fix the issue. It might be related to the OS' font stack. Anyway, I found a workaround, which, unfortunately involves some JS and generates a |
As @sebastian-xyz points out, our recent fix to get the font rendering issue (dark-on-dark rendering) fixed, we had to unfix this issue. We should explore a better solution here. |
@sebastian-xyz - one thing we could do is instead of relying on the monospaced font, we could draw the tables either using markdown tables (or maybe html tables?) or rendering them to images and using those |
Seems like the easiest fix is just to move the table drawing to use the same top and bottom line as the interior line. The bold line was very subtle to begin with, and I don't think it's really worth keeping if it causes rendering issues across platforms. |
I started some research on the different markdown processors on the jekyll website and played around with some of the processors. But I didn't have much success until now.
This is how the table looks like with the thin lines The readbiltity is definitely better. |
Yeah, let's just convert to thin lines, then. I've updated a few of the pages just to be sure it will work. I'll also add a PR to update the actual table drawing to use thin lines too. I figure, we might as well :) |
@homburg - Does this font work across platforms and browsers? |
I think Menlo is only installed by default on macOS, but other platforms will fall back to the "monospace" definition. |
@homburg - our previous fix was something like this, where it should fallback between fonts. Unfortunately, we had to remove the fix because it rendered dark text on dark backgrounds for some versions of Firefox. |
@jonathandturner Which versions are you referring to? I'm sure this can be fixed, either by adjusting some CSS or by using |
I tested this with I think the fall back might work this time because the fonts don't need to be added to the source of the website because they are part of the system. |
I found the discussion on Discord. Here's what I don't understand:
@jonathandturner @sebastian-xyz I vote to enable the web font again, until we know more. |
If a web font is not an option, we need to list monospaced fonts that are available on common operating systems and support box drawing characters. This could work, but I haven't tested it: font-family: Consolas, Menlo, Monaco, Hack, Roboto Mono, Droid Sans Mono, Liberation Mono, monospace; |
Let's give it a try and see if it fixes the issue for people |
Hi,
Shouldn't there be at least a My browser doesn't load remote fonts and I don't have any of the listed fonts installed, so it picks up a serif font and the tables at https://www.nushell.sh/book/ end up looking more like spaghetti. |
added how to run scripts
Checking to see if this can be closed - |
i think we can close this now. thanks for finding it. |
@fdncred check, for example: https://www.nushell.sh/book/quick_tour.html on Chrome for Android or Firefox for Android. The issue is still present. |
@Aloso can you point to the PR where it was fixed and reverted? |
I noticed some people talking about how tables looked in different browsers on Reddit, and then when I checked nushell.sh I noticed a similar thing. Here's what I see in Firefox+Windows:
I wonder if there's a way to either render this the same across browsers, or if maybe we should just put an image there instead.
The text was updated successfully, but these errors were encountered: