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 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 added this to the 21.03 Roadmap milestone Oct 19, 2020
@garbas garbas removed this from the 21.03 Roadmap milestone Oct 19, 2020
@samueldr
Copy link
Member

@samueldr 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 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 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
1 check passed
1 check passed
@github-actions[bot]
build-and-deploy build-and-deploy
Details
@jtojnar jtojnar deleted the patch-1 branch Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants