This need to be wrapped in a div. https://github.com/enonic/npm-react-components/blame/556ec5df8f46d43510bccc4558f80a00d093fc16/src/ComponentRegistry/ComponentWrapper.tsx#L22 Like here: https://github.com/enonic/npm-react-components/blame/556ec5df8f46d43510bccc4558f80a00d093fc16/src/ComponentRegistry/ComponentWrapper.tsx#L36-L43 Let's say you have a region using display:flex And a part with padding Here the padding will work: ``` <region> <div> <part/> </div> </region> ``` Here display flex will override the padding: ``` <region> <part/> </region> ``` Which means styling will work differently between edit and other modes. Only the data-portal-component-type attribute can be removed outside edit mode. The div must always be there.