x/tools/cmd/present: incorrect left alignement with .code -numbers #41728
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
This is the latest release.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
-numbers
option, e.g. https://play.golang.org/p/LZRH88YHMyuWhat did you expect to see?
On slide 2, the Go code is correctly formatted from a left margin, and uses the official Go listing font from the Go brand guide, page 10 i.e. (font "Go")
What did you see instead?
On slide 2, the width of the line numbers varies, increasing at line 10 because it now has two digits, breaking the alignment of the code.
The font used for the listing is
Droid Sans Mono
.Suggested fix
pre
selector to start byGo
instead ofDroid Sans Mono
and add a@font-face
to load it.cmd/present/static/styles.css
by modifying the rules for thepre.numbers span:before
selector.Assuming listings on slides and blogs are always less than 100 lines long, just adding
width: 1.5em
if enough to fix the issue. A completely correct fix would need to adjust column width based on the actual numbers, probably changing the markup.The text was updated successfully, but these errors were encountered: