-
|
The fix in PR #671 solves the caption width issue by adding an inline I was wondering why a CSS-only approach was not used instead, similar to TYPO3
This usually keeps the caption width coupled to the image width as well (with Is there a specific reason this was avoided? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hi @prdt3e, thanks for the question. But, no, definitely not! I treat this an "hack". Using display: table for layout control is, in my view, a workaround rather than a robust solution. It switches the element into an entirely different layout model, which introduces side effects that are difficult to predict and harder to maintain, particularly in flex or grid contexts. It also changes intrinsic sizing behavior and interaction patterns in ways that are not always obvious. While it may solve the immediate width coupling issue, it can create fragile behavior in more complex layouts or when additional styling is applied later. The inline max-width approach is more explicit and deterministic. It constrains the figure without altering its layout model, which makes the behavior easier to reason about and less prone to unexpected regressions. That’s why we opted against the CSS-only table-based solution. |
Beta Was this translation helpful? Give feedback.
-
|
You were right. I just checked bootstrap_package as well. |
Beta Was this translation helpful? Give feedback.
Hi @prdt3e,
thanks for the question.
But, no, definitely not! I treat this an "hack".
Using display: table for layout control is, in my view, a workaround rather than a robust solution. It switches the element into an entirely different layout model, which introduces side effects that are difficult to predict and harder to maintain, particularly in flex or grid contexts.
It also changes intrinsic sizing behavior and interaction patterns in ways that are not always obvious. While it may solve the immediate width coupling issue, it can create fragile behavior in more complex layouts or when additional styling is applied later.
The inline max-width approach is more explicit and deterministic…