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

Multi-line admonition title's icon aligns with last line #2099

Open
stevepiercy opened this issue Jan 20, 2025 · 1 comment · May be fixed by #2100
Open

Multi-line admonition title's icon aligns with last line #2099

stevepiercy opened this issue Jan 20, 2025 · 1 comment · May be fixed by #2100
Labels
kind: bug Something isn't working tag: CSS CSS and SCSS related issues

Comments

@stevepiercy
Copy link
Contributor

When using an admonition title that soft wraps across multiple lines, its icon aligns with the last line of the admonition.

The following example uses sphinx-togglebutton, but it's not necessary to reproduce the issue. See also the screenshot.

```{admonition} Warning! This feature is experimental and only applies to registering routes for React Router 7 applications. Click to accept the risks and read details.
:class: warning, toggle

Uh-oh, now you're in trouble!
```

Image

To fix this, I added a one-line style to my child theme, plone-sphinx-theme.

https://github.com/plone/plone-sphinx-theme/blob/f30931569351be713c57eaa73dac3cb4f4478e8a/src/plone_sphinx_theme/assets/styles/content/_admonitions.scss#L14

      top: 0.5rem;

And here's the result.

Image

If you like, I can submit a pull request with this change. Please let me know. Thank you!

@trallard trallard added kind: bug Something isn't working tag: CSS CSS and SCSS related issues labels Jan 20, 2025
@trallard
Copy link
Collaborator

Hi @stevepiercy, thanks for flagging this.
If you are up to open a PR to fix this alignment issue we would appreciate it very much 🙏🏽

stevepiercy added a commit to stevepiercy/pydata-sphinx-theme that referenced this issue Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working tag: CSS CSS and SCSS related issues
Projects
None yet
2 participants