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

manual: do not use normal whitespace in code #617

Merged
merged 1 commit into from Oct 19, 2020
Merged

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Oct 17, 2020

It breaks prompts among other things:
https://nixos.org/manual/nixpkgs/stable/#sec-patches

@samueldr samueldr self-assigned this Oct 18, 2020
@samueldr
Copy link
Member

samueldr commented Oct 18, 2020

(Note to self) fix pre code

I haven't taken the time to analyze the problem entirely, but that's my 2 minutes understanding. I guess what would be needed is to check why the previous styles (which IIRC this is imported from) did this.

@garbas garbas modified the milestone: 21.03 Roadmap Oct 19, 2020
@samueldr
Copy link
Member

samueldr commented Oct 19, 2020

Yep, it was part of the previous implementation.

And looking at the previous manual and manually doing the equivalent change shows that some section doesn't wrap as needed:

Though it also shows that somehow spaces are kept. Spooky!

With the new design things are fine with this disabled; there is no unexpected horizontal scrollbar.

@jtojnar
Copy link
Contributor Author

jtojnar commented Oct 19, 2020

Might be caused by a change in the syntax highlighter then? Because it seems to wrap the prompts in <code>.

@samueldr
Copy link
Member

samueldr commented Oct 19, 2020

Ah, I was updating the comment, sorry :)

The produced DOM is equivalent, the tooling to build the site hasn't changed. So I don't think so.

The reason is that bootstrap added:

code {
   white-space: nowrap;
}

By default. Meanwhile it now goes to the browser default white-space: pre;. So the original implementation was fighting against bootstrap.

@samueldr samueldr merged commit 4507719 into NixOS:master Oct 19, 2020
@jtojnar jtojnar deleted the patch-1 branch October 19, 2020 20:28
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

Successfully merging this pull request may close these issues.

None yet

3 participants