Skip to content
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

Prevent permalink icon from wrapping alone #1417

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

n-peugnet
Copy link

.fa styles sets display to inline-block. We force the .headerlink elements to stay inline, to make it wrap together with the previous word.

This should fix: #1412
But I will wait @benjaoming to push the built assets to see the result.

.fa styles sets display to inline-block. We force the .headerlink elments to stay inline, to make it wrap together with the previous word.
@n-peugnet n-peugnet requested a review from a team as a code owner January 20, 2023 16:46
@benjaoming
Copy link
Contributor

Tested a build with the same documentation that had the issue ✔️

Before

image

After

image

Copy link
Contributor

@benjaoming benjaoming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agjohnson any worries about this one?

From a test, this works. The placement of the pilcrow seems unchanged
image

I also just discovered that it's not a pilcrow in later versions of Sphinx.

image

@n-peugnet
Copy link
Author

n-peugnet commented Jan 20, 2023

I also just discovered that it's not a pilcrow in later versions of Sphinx.

I think the link icon comes from the RTD theme:

# sphinx emits the permalink icon for headers, so choose one more in keeping with our theme
if sphinx_version >= (3, 5, 0):
app.config.html_permalinks_icon = "\uf0c1"
else:
app.config.html_add_permalinks = "\uf0c1"

The strange part for me is: in which conditions do you have the pilcrow with Sphinx RTD theme?

@benjaoming
Copy link
Contributor

The strange part for me is: in which conditions do you have the pilcrow with Sphinx RTD theme?

LOL, I honestly didn't consider this the reason. So I'm actually seeing the new icon after we started building with a fix in readthedocs/readthedocs.org#9654 -- long story short, then the setup(app) signal has been skipped in certain scenarios on Read the Docs itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CSS: Do not allow section anchor ¶ to wrap alone to next line
2 participants