mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-22 23:27:54 -05:00
Merge pull request #3140 from benjiwheeler/margin-collapse-use-padding-instead
use padding to avoid margin collapse; drop approach that used `overflow: auto`
This commit is contained in:
commit
88b3ea6698
3 changed files with 10 additions and 19 deletions
|
@ -9,6 +9,8 @@
|
|||
.join-flow-inner-content {
|
||||
box-shadow: none;
|
||||
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;
|
||||
}
|
||||
|
|
|
@ -8,15 +8,13 @@ const ModalInnerContent = ({
|
|||
children,
|
||||
className
|
||||
}) => (
|
||||
<div className="modal-inner-clear">
|
||||
<div
|
||||
className={classNames(
|
||||
'modal-inner-content',
|
||||
className
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
<div
|
||||
className={classNames(
|
||||
'modal-inner-content',
|
||||
className
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
||||
|
|
|
@ -1,15 +1,6 @@
|
|||
@import "../../../colors";
|
||||
@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 {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
|
|
Loading…
Reference in a new issue