Skip to content

"display: block" fallback #4

@revyh

Description

@revyh

It's not another one fallback option like column-count, overflow or clearfix. Spec defines flow-root as display: block + new BFC. And display: block part is missed for now. It allows cases like this:

/* before */
span {
  display: flow-root;
}

/* after "clearfix" fallback */
span {
  /* if browser doesn't support "flow-root" than "display" will actually have "inline" value, which will mess with pseudo elements */
  display: flow-root;
}

span::after {
  content: '';
  display: table;
  clear: both;
}

Instead it should be transformed like this:

/* after "clearfix" fallback */
span {
  display: block;
  display: flow-root;
}

span::after {...}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions