Repository navigation
fix: code in a table cell no longer breaks mid-word - #8
Merged
Merged
Conversation
Inline code has overflow-wrap: anywhere so long identifiers wrap in prose, but inside a table it lets the browser shrink a code column until names split one character at a time (cui_app_c / reate). Code in td and th now stays on one line, and a table too wide for the page scrolls, as .doc-content table already allows with overflow-x: auto.
With code cells kept on one line, a 420px viewport squeezed the prose column to one word per line and each row grew to about 370px tall. Below 760px, cells in a table that holds code get a 14rem minimum width, so the prose wraps at a readable width and the table scrolls sideways.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Inline code gets
overflow-wrap: anywhereso a long identifier can wrap in prose. Inside a table that same rule lets the browser shrink a code column until names split one character at a time, socui_app_createshows up ascui_app_creat/e.This adds one rule to
resources/static/css/screen.css: code in atdorthkeepsoverflow-wrap: normalandwhite-space: nowrap. The prose columns wrap instead. A table too wide for the page scrolls, since.doc-content tablealready hasoverflow-x: auto.Found on kaew's core guide, in the table of functions that return raw pointers. Before, the C names and return types broke mid-word. After, each one stays on a single line and the reason column wraps.
bb testpasses (111 tests, 293 assertions). It's CSS only, so I checked it by building kaew's site against this branch (DOCS_ENGINE=…/docs-engine jolt site:build) and comparing screenshots in headless Chrome with and without the rule.