-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
flow-root creates new BFC on element, wich prevent margins of children elements from "leaking". column-count and overflow fallbacks also creates new BFC, so there is no problems with them. But clearfix fallback doesn't create new BFC and margin-top "leaks" from children elements.
Here is the simple pen that illustrates this issue.
If we want to be closer to spec, than we should replace clearfix from
.clearfix::after {
content: '';
display: table;
clear: both;
}to
.clearfix::before,
.clearfix::after {
content: '';
display: table;
}
.clearfix::after {
clear: both;
}Metadata
Metadata
Assignees
Labels
No labels