Fix container widgets clipping and label overlap
A container's own visible card is inset from its allocated board cell by the board's standard per-item gap, but items inside it are positioned in a coordinate space sized to the un-inset column/row count - so without correcting for that, items (not just the grid's own box) spilled past the container's right/bottom edge by that inset amount, worse the busier/more zoomed-out the board is. Scales the container's inner grid content down to fit the actual card size, using the same zoom mechanism the board's own top-level canvas uses for its whole-board zoom, just one level deeper. Corrects --board-canvas-ui-scale to compensate so icon/text/custom-CSS sizing inside the container isn't affected - computed as a plain JS number rather than a CSS calc() referencing the property's own inherited value, since custom properties don't have a sequential/temporal order within the same element and doing so is a circular reference that silently invalidates the whole property for every descendant. Also fixes the collapsible container's label bar poking above the card's rounded top border via a negative offset - it now sits flush inside it.
This commit is contained in:
1 parent
70e1b29913
commit
78a4f0e513
2 files changed
+49
-6
No files matched your search
@@ -67,7 +67,7 @@ export const BoardContainerSection = ({ section }: Props) => {
|
||||
<Button
|
||||
className={classes.containerToggle}
|
||||
pos="absolute"
|
||||
top={isVisuallyCollapsed ? 0 : "calc(var(--mantine-spacing-xs) * -1)"}
|
||||
top={0}
|
||||
left={0}
|
||||
w="100%"
|
||||
h={isVisuallyCollapsed ? "100%" : 24}
|
||||
|
||||
Reference in new issue
Block a user