page.html: Position the flyout to bottom-left, on ReadTheDocs #865
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.
As we know, ReadTheDocs has developed a new backend for their content integrations, including the floating menu of different versions and other links that's displayed when docs are built on the ReadTheDocs site. This new menu is built as an "addon" which can be configured in their system, but which can't be styled by theme CSS since it lives in a shadow DOM.
Recently (see readthedocs/addons#395), the ability to configure the position of that menu was added — the position can be set to any of bottom-right, bottom-left, top-right, or top-left. Positioning can be overridden in the project settings, but the new default setting for projects is "Default (from theme or Read the Docs)".
The Read the Docs default positioning is bottom-right, which in Furo docs tends to overlap content. The theme default can be changed, however, by adding a new tag to the content body:
This PR adds that tag to the
page.html
template, making the Furo default position for the flyoutbottom-left
instead ofbottom-right
. Again, individual projects can still override this in their settings; this merely sets the default for the theme.I don't know if this is the best place to put such a tag, I only know that this worked for me in a test project. So consider this PR as more of a change suggestion than a change proposal. If there's a better implementation, I'm happy to make any changes necessary, or to close this entirely in favor of a better fix.