Skip to content
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

Prevent wrapping long lines on small screens #115

Open
dharmatech opened this issue Aug 9, 2023 · 4 comments
Open

Prevent wrapping long lines on small screens #115

dharmatech opened this issue Aug 9, 2023 · 4 comments

Comments

@dharmatech
Copy link

Hello.

This is an amazing project! Thank you!

Example output

Here, I'm viewing a page generated by terminal-to-html:

image

Example output on phone

If I open the same page on my phone, the columns aren't lined up:

image

Question

Is there a way to get the output to not wrap?

Thank you!

@dharmatech
Copy link
Author

OK, I'm part way there!

I set white-space to pre:

image

Desktop

On desktop, if I shrink the window, it looks good (text doesn't wrap):

image

Mobile

On mobile, the columns align now!

But notice that the black background doesn't cover the whole screen:

image

@dharmatech
Copy link
Author

Here's the page I'm viewing above in case you'd like to recreate the issue on mobile:

https://dharmatech.dev/data/net-liquidity.ps1/test-terminal-to-html.html

@dharmatech
Copy link
Author

OK, it looks like this resolves the background issue on mobile:

<body style="width: fit-content;">

image

@triarius
Copy link
Contributor

Thanks for figuring this out @dharmatech. We think the best way forward is to give users the ability to override the default stylesheet (internal/assests/terminal.css) from the command line with an option like --stylesheet.

We've put this on our backlog, but in the meantime, PRs are welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants