Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not fix and not legacy #3

Closed
TrySound opened this issue Jul 25, 2015 · 4 comments
Closed

not fix and not legacy #3

TrySound opened this issue Jul 25, 2015 · 4 comments

Comments

@TrySound
Copy link
Contributor

I like to use case with before and after that will clear margin collapsing. But legacy is not that thing I want.

@madeleineostoja
Copy link
Owner

sorry I don't fully understand what you're getting at, can you provide a before/after code sample?

@TrySound
Copy link
Contributor Author

.el:before,
.el:after {
  content: '';
  display: table;
}

el:after {
  clear: both;
}

.inner {
  margin: 40px 0;
}
div.el
  div.inner content

@madeleineostoja
Copy link
Owner

Right, I get what you're trying to do now. I don't think this kind of thing fits with this plugin, since you're not 'clearing' anything. You're changing the element's display context, and a clear: margins would he all kinds of confusing. Not to mention there are a myriad of other ways you can stop margin collapse (explicit overflow, inline-block, positioning, etc.), so there's not really a need for that behaviour here I feel.

You can also use fix-legacy for this, because all that adds to your code is clearing, and I assume you wouldn't need to do this if there were floats you didn't want cleared because setting a float stops margin collapse anyway.

@TrySound
Copy link
Contributor Author

Okay, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants