Skip to content

[TASK] Float images with :align: instead of float-left/float-right - #587

Merged
linawolf merged 2 commits into
TYPO3-Documentation:mainfrom
CybotTM:task/float-classes-bootstrap5
Oct 1, 2026
Merged

linawolf merged 2 commits into
TYPO3-Documentation:mainfrom
CybotTM:task/float-classes-bootstrap5

Conversation

@CybotTM

@CybotTM CybotTM commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

When merged, the image float page recommends :align: as the way to float an image or figure, and its live examples no longer use the Bootstrap 4 class names. Rendered with the code of TYPO3-Documentation/render-guides#1179, the guide then logs no deprecation warning; without this change it logs two.

render-guides#1179 renames the float classes to Bootstrap 5's float-start / float-end, rewrites the old names and logs a deprecation warning for them. This page recommended :class: float-left as the first way to float an image, and examples 8 and 10 used it.

Changes:

  • :align: is the one documented way to float. render-guides main already maps it on both image and figure, so the examples render the same before and after #1179. Classes such as with-shadow stay in :class: next to it.
  • The separate "Float with CSS classes" section is gone (review feedback). Its image-float-css-classes anchor now sits on the align section, so existing links keep working. One paragraph still names float-start / float-end and says that float-left / float-right are deprecated. That sentence is only true once #1179 is released, so this PR should merge after it.
  • Images.rst lists float-start / float-end under :class: and :align: for images and figures.

Testing:

  • make test-docs with render-guides:latest exits 0; a full render with the same image emits no warnings and keeps both image-float-css-classes and image-float-align-option as ids on the page.
  • Rendered with the #1179 branch (ce3fe63f), before the section removal: 0 deprecation warnings, against 2 for main (94e9e2f) with the same renderer. The page's floated examples render class="with-shadow float-start" and class="float-end".

Assisted by claude-code:claude-opus-5.5 — Session

render-guides replaces the Bootstrap 4 classes float-left and
float-right with float-start and float-end, and logs a deprecation
warning when a document still uses the old names
(TYPO3-Documentation/render-guides#1179). This guide recommended
:class: float-left as the first way to float an image, and two of its
live examples used it, so the guide itself would log two warnings.

The guide now recommends :align:, which render-guides already maps on
both image and figure, and keeps other classes such as with-shadow in
:class: next to it. The class form is float-start / float-end, with a
substitution image as its example: docutils only accepts top, middle
and bottom for :align: inside a substitution definition. The page also
says that the old class names are deprecated.

Assisted-by: Claude Opus 5 <noreply@anthropic.com>
Agent-Session: https://claude.ai/code/session_019F8MxNJMzB34gc68wg6Xkv
Agent-Host: 0493f0
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Comment thread Documentation/Reference/ReStructuredText/Graphics/ImageAlignment.rst Outdated
:align: floats both image and figure, and other classes such as
with-shadow sit next to it in :class:, so a separate section for the
float classes only repeats it. Its one argument, the substitution
image, rests on a docutils limit that render-guides does not have.

The page now leads with the align option. The image-float-css-classes
anchor moves there so existing links keep working, and one paragraph
still names float-start / float-end and the deprecated float-left /
float-right.

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://claude.ai/code/session_01XzfnUQmxDxanqouHSEHHky
Agent-Host: 32116e
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@linawolf
linawolf merged commit 41db565 into TYPO3-Documentation:main Oct 1, 2026
1 check passed
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.

2 participants