riboseinc / jekyll-theme-open-project

Jekyll theme for site suite presenting your open software and specifications.
MIT License
30 stars 3 forks source link

Admonition block layout is broken when it contains very wide code block(s) #66

Closed strogonoff closed 5 years ago

strogonoff commented 5 years ago

See @ronaldtse’s screenshot: https://github.com/metanorma/metanorma.com/issues/77

Should be: Code listing block behavior should be self-contained and the same wherever it appears.

In fact: Code listings can behave differently when inside admonition blocks.

Should be: Admonition block is constrained to containing article’s width; code block is constrained to admonition block width. Admonition block never scrolls regardless of how long the lines are in contained code listing(s).

In fact: Admonition block is constrained by width, but code block is not. Instead of scrolling horizontally, code block with long lines becomes wide and causes containing admonition block to scroll.

To solve we should look into how admonition blocks and code listing blocks are styled. Enforce code listing block width when within admonition block. Ensure that it’s overflow-x allows scrolling to occur.