diff --git a/packages/core/admin/admin/src/content-manager/components/RepeatableComponent/components/Accordion.js b/packages/core/admin/admin/src/content-manager/components/RepeatableComponent/components/Accordion.js index b0807f5e9f..dcb2bd1aaa 100644 --- a/packages/core/admin/admin/src/content-manager/components/RepeatableComponent/components/Accordion.js +++ b/packages/core/admin/admin/src/content-manager/components/RepeatableComponent/components/Accordion.js @@ -13,27 +13,30 @@ export const Footer = styled(Box)` `; export const Content = styled(Box)` - border: 1px solid ${({ theme }) => theme.colors.neutral200}; border-bottom: none; - border-radius: ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius} 0 0; overflow: hidden; + /* add the borders and make sure the top is transparent to avoid jumping with the hover effect */ + & > div > div { + border: 1px solid ${({ theme }) => theme.colors.neutral200}; + border-top-color: transparent; + } + + /* the top accordion _does_ need a border though */ + & > div:first-child > div { + border-top: 1px solid ${({ theme }) => theme.colors.neutral200}; + } + /* Reset all the border-radius' */ & > div > div, & > div > div > div { border-radius: unset; } + /* Give the border radius back to the first accordion */ & > div:first-child > div, & > div:first-child > div > div { - /* use 1px less to avoid that weird thing where the borders don't align */ - border-radius: ${({ theme }) => `calc(${theme.borderRadius} - 1px)`} - ${({ theme }) => `calc(${theme.borderRadius} - 1px)`} 0 0; - } - - /* re-add the border bottom */ - & > div > div { - border-bottom: 1px solid ${({ theme }) => theme.colors.neutral200}; + border-radius: ${({ theme }) => theme.borderRadius} ${({ theme }) => theme.borderRadius} 0 0; } & [data-strapi-expanded='true'] {