diff --git a/frontend/src/component/common/ConstraintsList/ConstraintsList.tsx b/frontend/src/component/common/ConstraintsList/ConstraintsList.tsx index 40875c543d..4b72ca5a70 100644 --- a/frontend/src/component/common/ConstraintsList/ConstraintsList.tsx +++ b/frontend/src/component/common/ConstraintsList/ConstraintsList.tsx @@ -18,13 +18,7 @@ const StyledListItem = styled('li')(({ theme }) => ({ padding: theme.spacing(2, 3), display: 'flex', flexFlow: 'column', - gap: theme.spacing(1), - '&:has(>.MuiAccordion-root)': { - // todo: look at this later. MUI accordions rely heavily on their - // padding, but it doesn't collapse with the surrounding padding here, - // so they become super chunky otherwise. - paddingBlock: 0, - }, + gap: theme.spacing(2), })); const StyledAnd = styled('div')(({ theme }) => ({ diff --git a/frontend/src/component/common/SegmentItem/SegmentItem.tsx b/frontend/src/component/common/SegmentItem/SegmentItem.tsx index 4552ef11be..53a60f4007 100644 --- a/frontend/src/component/common/SegmentItem/SegmentItem.tsx +++ b/frontend/src/component/common/SegmentItem/SegmentItem.tsx @@ -27,6 +27,7 @@ const StyledAccordion = styled(Accordion)(({ theme }) => ({ margin: 0, padding: 0, '::before': { + // MUI separator between accordions display: 'none', }, })); @@ -34,10 +35,14 @@ const StyledAccordion = styled(Accordion)(({ theme }) => ({ const StyledAccordionSummary = styled(AccordionSummary)(({ theme }) => ({ padding: 0, fontSize: theme.typography.body2.fontSize, + minHeight: 'unset', + '.MuiAccordionSummary-content, .MuiAccordionSummary-content.Mui-expanded': { + margin: 0, + }, })); const StyledAccordionDetails = styled(AccordionDetails)(({ theme }) => ({ - padding: theme.spacing(0, 2, 3), + padding: theme.spacing(2, 0, 1), })); const StyledLink = styled(Link)({ @@ -51,7 +56,8 @@ const StyledActionsContainer = styled('div')(({ theme }) => ({ display: 'flex', alignItems: 'center', marginLeft: 'auto', - marginRight: theme.spacing(2), + marginTop: theme.spacing(-0.5), + marginBottom: theme.spacing(-0.5), })); const StyledButton = styled(Button)(({ theme }) => ({ @@ -88,7 +94,7 @@ export const SegmentItem: FC = ({ }, [constraintList, segment.constraints]); return ( - +