Skip to content

Conversation

@tetrapod00
Copy link
Contributor

Retry of #10566, see that PR for details of the problem we're solving.

Tested on Firefox and Edge, checked videos and tables.

This time, use :align: default for each video, but don't add any custom CSS. This will align videos on the left without floating:
Screenshot 2025-02-03 112449
image
Since no CSS is changed, tables still render correctly:
Screenshot 2025-02-03 112312
Screenshot 2025-02-03 112408

Left alignment matches the behavior of 4.3 videos. While I think center alignment looks a bit better, I don't see a clear way to do it without introducing additional tags at every video usage, and left alignment looks fine and matches existing behavior.

Why we can't use :align: left, as the plugin intends:
It left-aligns with float due to our Sphinx theme, see the original PR for details.

Why we can't use :align: center to center, as the plugin intends:
It left-aligns due to our Sphinx theme.

Why we can't use :align: default with custom CSS just for videos, to center:
The video plugin places the video inside a div which only has the align-default class, so there's no way to specify align-default just for the videos. We could add a class with :class:, see here. But after reverting the first fix, I'm not sure trying to maintain custom CSS just to center videos is worth the maintenance, and this would also require the use of an extra tag at every video instance.

@tetrapod00 tetrapod00 added bug content:website Issues related to adding website features and fixing bugs, whether on the front or back-end area:manual Issues and PRs related to the Manual/Tutorials section of the documentation area:engine details Issues and PRs related to the Engine Details section of the documentation labels Feb 3, 2025
@tetrapod00 tetrapod00 added this to the 4.4 milestone Feb 3, 2025
@mhilbrunner mhilbrunner merged commit 1afdbaf into godotengine:master Feb 4, 2025
1 check passed
@mhilbrunner
Copy link
Member

Thanks!

@tetrapod00 tetrapod00 deleted the fix-video-again branch February 4, 2025 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:engine details Issues and PRs related to the Engine Details section of the documentation area:manual Issues and PRs related to the Manual/Tutorials section of the documentation bug content:website Issues related to adding website features and fixing bugs, whether on the front or back-end

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants