Godot-docs: Docs sidebar not wide enough

Created on 22 Jan 2020  路  4Comments  路  Source: godotengine/godot-docs

Right now a few of the class names are so long that the sidebar forces them onto a new line (e.g. VisualShaderNodeVectorScalarSmoothStep), separate from their "+" button, but they still run off the side of the sidebar. This looks incredibly odd, especially since the docs have open space on either side.

CC: @Calinou since you've been handling all the website updates recently :)

Screenshot 2020-01-21 at 9 25 38 PM

bug

All 4 comments

I think this was already an issue before I centered the documenation's main page. I'm not sure how difficult it'd be to enlarge the sidebar slightly. If enlarging the sidebar isn't possible, we could make overflowing text result in an ellipsis so it doesn't break into multiple lines.

This is probably something that would be worth discussing with upstream at https://github.com/readthedocs/sphinx_rtd_theme. Implementing a ad hoc solution like widening the sidebar could be done, but eventually me might get an even longer name and the same issue again. A solution is likely necessary for better handling of long, unbreakable section names.

Adding the following CSS snippet leads to an acceptable solution for class reference headers, but it's not great in other sections:

.wy-menu-vertical li.current a {
    white-space: nowrap;
}

Class reference headers (OK)

Class reference titles

Other headers (bad)

GDScript titles

Unfortunately, I don't think it's possible to target only the class reference headers using CSS. I also tried to apply text ellipsis using text-overflow: ellipsis, but I didn't succeed.

@Calinou throwing display: flex on the same selector you did white-space: nowrap; should solve both problems.

Screen Shot 2020-01-28 at 5 48 05 PM
Screen Shot 2020-01-28 at 5 48 23 PM

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hubbyist picture hubbyist  路  4Comments

golddotasksquestions picture golddotasksquestions  路  3Comments

stsewd picture stsewd  路  3Comments

eon-s picture eon-s  路  3Comments

youreperfect picture youreperfect  路  3Comments