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

basic CSS: allow more "floating" #7878

Merged
merged 3 commits into from Jul 5, 2020
Merged

Conversation

mgeier
Copy link
Contributor

@mgeier mgeier commented Jun 27, 2020

I wasn't aware of an IMHO very un-intuitive interaction between overflow and float: If an element has an overflow setting, preceding elements cannot "float" into it.

That's why I'm suggesting to remove the overflow setting from admonition and topic.

This partially reverts my previous PR #7542. I'm only keeping the overflow setting on sidebar, where "floating into it" is not desired anyway.

For the other elements, it looks like we cannot have perfect "overflow" and perfect "float" behavior at the same time.
Derived themes can still add their overflow settings if they want.

This also partially reverts my previous PR #7484. It allows "right floats" to float into admonition and topic elements (as was possible before #7484). It still doesn't allow floating into code blocks, because this would interact badly with their overflow behavior (which is more important).

Feature or Bugfix

  • Bugfix

Copy link
Member

@tk0miya tk0miya left a comment

Choose a reason for hiding this comment

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

@mgeier Could you add a CHANGES entry please? I can't describe what is changed by this.

Note: I still don't understand what is happened now. So I'm just merging this...

@tk0miya tk0miya added this to the 3.1.2 milestone Jul 5, 2020
mgeier added a commit to mgeier/sphinx that referenced this pull request Jul 5, 2020
@mgeier
Copy link
Contributor Author

mgeier commented Jul 5, 2020

I've re-based this PR and added CHANGES in c40cb79.

There is no separate issue for this, one example for the problem has been reported in #7484 (comment)

The problem is that it's not possible to have overflow (i.e. scrollbars) on admonitions etc. (as I suggested in #7542) and at the same time allowing preceding elements (like sidebar) to "flow" into the admonition.

This PR partially reverts #7542 and #7484 to allow sidebar to "flow" into admonitions etc.

This is more in line with previous behavior (before #7542 and #7484). If a derived theme wants to enable overflow behavior (and thereby disable "float" behavior), it can still do that, but I think for the basic theme we shouldn't do that.

This PR also adds a so-called "clearfix" (in 3098aba) to avoid elements (like images) to "flow" out of the bottom of admonitions etc.

@tk0miya tk0miya merged commit d83d592 into sphinx-doc:3.1.x Jul 5, 2020
@tk0miya
Copy link
Member

tk0miya commented Jul 5, 2020

Thank you for the detailed explanation! Merged.

@mgeier mgeier deleted the float-clearing branch July 5, 2020 10:54
mikeri pushed a commit to mikeri/searx that referenced this pull request Mar 7, 2021
This reverts commit 0616684.

Since PR sphinx-doc/sphinx#7878 has been merged into
Spinx-doc (v3.1.2), this patch is no longer needed:

  See sphinx-doc project, PR 7838 & 7484 with elementary patch to the basic CSS:

  - sphinx-doc/sphinx#7838 (comment)
  - sphinx-doc/sphinx#7484 (comment)

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants