diff --git a/packages/asc-web-common/components/Section/sub-components/section-body.js b/packages/asc-web-common/components/Section/sub-components/section-body.js index 47395aa240..a25161fe45 100644 --- a/packages/asc-web-common/components/Section/sub-components/section-body.js +++ b/packages/asc-web-common/components/Section/sub-components/section-body.js @@ -72,8 +72,8 @@ const commonStyles = css` `; const StyledSectionBody = styled.div` + max-width: 100vw !important; ${commonStyles} - ${(props) => props.withScroll && ` @@ -89,9 +89,8 @@ const StyledSectionBody = styled.div` margin-left: -24px; ` } - `} - - .additional-scroll-height { + `} + .additional-scroll-height { ${(props) => !props.withScroll && !props.pinned && @@ -102,9 +101,8 @@ const StyledSectionBody = styled.div` `; const StyledDropZoneBody = styled(DragAndDrop)` - ${commonStyles} - - .drag-and-drop { + max-width: 100vw !important; + ${commonStyles} .drag-and-drop { user-select: none; height: 100%; } diff --git a/packages/asc-web-common/components/Section/sub-components/section-container.js b/packages/asc-web-common/components/Section/sub-components/section-container.js index ebffeea9c4..26b38bab6f 100644 --- a/packages/asc-web-common/components/Section/sub-components/section-container.js +++ b/packages/asc-web-common/components/Section/sub-components/section-container.js @@ -38,23 +38,19 @@ const StyledSectionContainer = styled.section` display: flex; flex-direction: column; - width: calc(100vw - 256px); - max-width: calc(100vw - 256px); + width: 100%; + max-width: 100vw; @media ${tablet} { - width: ${(props) => - props.showText ? "calc(100vw - 240px)" : "calc(100vw - 52px)"}; - max-width: ${(props) => - props.showText ? "calc(100vw - 240px)" : "calc(100vw - 52px)"}; + width: 100%; + max-width: 100vw !important; padding: 0 0 0 16px; } ${isMobile && css` - width: ${(props) => - props.showText ? "calc(100vw - 240px)" : "calc(100vw - 52px)"} !important; - max-width: ${(props) => - props.showText ? "calc(100vw - 240px)" : "calc(100vw - 52px)"} !important; + width: 100% !important; + max-width: 100vw !important padding: 0 0 0 16px; ${tabletProps}; min-width: 100px; @@ -83,14 +79,6 @@ const StyledSectionContainer = styled.section` right: 15px; bottom: 83px; } - - ${(props) => - !props.isSectionHeaderAvailable && - css` - width: 100vw !important; - max-width: 100vw !important; - box-sizing: border-box; - `} `; StyledSectionContainer.defaultProps = { theme: Base };