Markdown OKF-Schema Studio

Behaviour SwRS-MDOKFSTUDIO-LAYOUT-022

Margin keeps blocks in the column and Full removes the limit

When the width mode is Margin or Full width, the extension SHALL keep tables, code blocks and figures inside the text column in Margin and let them scroll or wrap instead of leaving it, and lift the column limit with a page side gutter of 16 px in Full width, centring narrower tables and figures at their own width in every width mode.

Another outcome at step 2 of path 1 in StRS-MDOKFSTUDIO-LAYOUT-003, in the state “The width mode has changed”.

Scenarios 5

The situations the tests check; open one to read it.

nominalMode left
Givenan element marked wide in Auto mode
Whenthe mode returns to Margin
Thenthe mark and the breakout values are cleared
nominalFull width in a wide pane
GivenFull width mode and a 1600 px pane
Whenthe preview is rendered
Thenthe column cap is 100000 px and the content gutter is 16 px
the same pane in Margin mode has a content gutter of the clamp of 16 px, 8vw and 78 px, so up to 78 px each side instead of 16 px
nominalFull width centres the content
InputOutcome
Full width mode, light theme, 460 px pane (visual scenario v80)The table, code block and figure are centred with at least 15 px gutters and the text has 16 px (within 2 px) side margins
Full width mode, dark theme, 900 px pane (visual scenario v83)The same centring and gutters hold, and the page does not scroll horizontally
nominalNarrow tables and figures
Givena table 300 px wide in a 700 px column, in Margin, Auto and Full width
Whenthe preview is rendered
Thenthe table is centred through automatic inline margins in all three modes
a paragraph holding only an image and its caption has the figure and its caption centred under the picture, and a code block narrower than the column stays left with its own width
boundaryParagraph marked as a figure
InputOutcome
Top-level paragraph whose only child is an image and whose text is empty, measured in Margin, then in AutoCarries data-sphinx-preview-figure in both modes
Paragraph with an image and a sentenceNot marked; a mark left on a paragraph that no longer qualifies is removed
Top-level paragraph holding two images and no textNot marked as a figure

Implemented in 2

Tested by 5

Known limits (2)

Replaces

SwRS-MDOKFSTUDIO-LAYOUT-028Full width removes the column limit superseded superseded by SwRS-MDOKFSTUDIO-LAYOUT-022 Markdown file
SwRS-MDOKFSTUDIO-LAYOUT-029Narrow tables and figures are centred in every width mode superseded superseded by SwRS-MDOKFSTUDIO-LAYOUT-022 Markdown file
SwRS-MDOKFSTUDIO-LAYOUT-030A paragraph holding only an image is marked as a figure superseded superseded by SwRS-MDOKFSTUDIO-LAYOUT-022 Markdown file
SwRS-MDOKFSTUDIO-LAYOUT-039Full width centres the content with gutters of at least 15 px superseded superseded by SwRS-MDOKFSTUDIO-LAYOUT-022 Markdown file