-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Display the options list better on mobile devices #656
Comments
It looks like column ratios are needed on the table (e.g., |
Yikes, we definitely need to configure the column ratios 😬 |
@mojavelinux do we have a role/style to configure a min-width on a table (and make it scrollable). Below 650px it becomes difficult to read and in my opinion it would be better to add an horizontal scrollbar. |
No, it's not currently possible to add a horizontal scrollbars to tables. In fact, the only way to accomplish it is to use JavaScript to wrap the tables in a scrollable container. This is something we are discussing in the Antora default UI. See https://gitlab.com/antora/antora-ui-default/-/issues/207 We could add a solution to the Asciidoctor docs UI without having to push it up stream. Here's the script I currently use for a client's site: ;(function () {
'use strict'
find(document.querySelector('article.doc'), 'table.tableblock').forEach(function (table) {
var parent = table.parentNode
var maxWidth = parent.getBoundingClientRect().width
if (table.getBoundingClientRect().width <= maxWidth) return
var container = Object.assign(document.createElement('div'), { className: 'tablecontainer overflow' })
table.parentNode.insertBefore(container, table)
container.appendChild(table)
})
function find (from, selector) {
return [].slice.call(from.querySelectorAll(selector))
}
})() |
All extension options are listed in a table in https://docs.asciidoctor.org/browser-extension/options/#options
The table formatting squashes the middle option description text making it hard to read on mobile devices.
Changing the table formatting to span the option description text over the first two columns would make it more readable on mobile devices.
I could look at this in combination with #652 and #654
The text was updated successfully, but these errors were encountered: