use padding rather than margin to avoid margin collapse; drop overflow clear approach

This commit is contained in:
Ben Wheeler 2019-07-15 16:07:39 -04:00
parent 96a1b89ccb
commit 27cb6199b5
3 changed files with 10 additions and 19 deletions

View file

@ -9,6 +9,8 @@
.join-flow-inner-content { .join-flow-inner-content {
box-shadow: none; box-shadow: none;
width: calc(100% - 5.875rem); width: calc(100% - 5.875rem);
margin: 2.3125rem auto 2.5rem; /* must use padding for top, rather than margin, because margins will collapse */
margin: 0 auto;
padding: 2.3125rem 0 2.5rem;
font-size: .875rem; font-size: .875rem;
} }

View file

@ -8,7 +8,6 @@ const ModalInnerContent = ({
children, children,
className className
}) => ( }) => (
<div className="modal-inner-clear">
<div <div
className={classNames( className={classNames(
'modal-inner-content', 'modal-inner-content',
@ -17,7 +16,6 @@ const ModalInnerContent = ({
> >
{children} {children}
</div> </div>
</div>
); );
ModalInnerContent.propTypes = { ModalInnerContent.propTypes = {

View file

@ -1,15 +1,6 @@
@import "../../../colors"; @import "../../../colors";
@import "../../../frameless"; @import "../../../frameless";
/*
necessary to prevent modal-inner-content's margins from
unexpectedly collapsing with a parent
*/
.modal-inner-clear {
overflow: auto;
height: 100%;
}
.modal-inner-content { .modal-inner-content {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;