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

layout: Ensure abs-pos elements establish block formatting contexts #16310

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

layout: Ensure abs-pos elements establish block formatting contexts

Per CSS 2.1 § 9.4.1, absolutely positioned elements establish new
block formatting contexts for their contents.
  • Loading branch information
stshine committed Apr 8, 2017
commit c0b7a1247a295e78487fa8112d3ca4ca8d036c15
@@ -1429,6 +1429,9 @@ impl BlockFlow {
/// Determines the type of formatting context this is. See the definition of
/// `FormattingContextType`.
pub fn formatting_context_type(&self) -> FormattingContextType {
if self.base.flags.contains(IS_ABSOLUTELY_POSITIONED) {
return FormattingContextType::Other
}
let style = self.fragment.style();
if style.get_box().float != float::T::none {
return FormattingContextType::Other
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.