Home > Designing, Others > display: flow-root;

display: flow-root;

December 30th, 2016 Leave a comment Go to comments

News to me! There is a spec for it and Firefox says then intend to ship it. It’s just like display: block; only:

It always establishes a new block formatting context for its contents.

Meaning: you don’t have to use clearfix hacks. There is a bit more to it though. Fiona Chan has a mini-talk all about block formatting context. I think it affects z-index and transforms in some cases too. Anybody?

I suspect Nicole Sullivan will approve. She’s been writing and talking about new formatting contexts forever. In 2010 she even wrote:

I wish we had a simple property value pair that would do the same thing in standards-based browsers.

.lastUnit {
  formatting-context: new; /* please! */
}

Direct Link to ArticlePermalink


display: flow-root; is a post from CSS-Tricks

Categories: Designing, Others Tags:
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.