HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
philipwalton
flexbugs
Web Development2015–2024
philipwalton / flexbugs · Archived

flexbugs

A community-curated list of flexbox issues and cross-browser workarounds for them.

28Distinct people
32Mentions
1Explicit recommenders
13.5KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A community-curated list of flexbox issues and cross-browser workarounds for them.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

Flexbox in 5 minutes* * (Not including 6 hours of painstaking hacks to make it work with Safari and IE10) ;) I love Flexbox and use it for all my projects now, but yeah: it's…

namuol used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year32 dated mentions

Observed mentions: 2015-01-05 07:20:13 UTC to 2024-01-10 23:55:57 UTC.

02468102015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 8 mentions; 2 submissions, 6 comments20152016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC826
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC909
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC505
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC312
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC303
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC211

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
⚠️ UPDATE: this repo is no longer maintained, as most of the bugs listed here are fixed in modern browsers. Flexbugs This repository is a community-curated list of flexbox issues and cross-browser workarounds for them. The goal is that if you're building a website using flexbox and something isn't working as you'd expect, you can find the solution here. As the spec continues to evolve and vendors nail down their implementations, this repo will be updated with newly discovered issues and remove old issues as they're fixed or become obsolete. If you discover a bug that's not listed here, please report it so everyone else can benefit. The bugs and their workarounds Minimum content sizing of flex items not honored Column flex items set to align-items: center overflow their container min-height on a flex container won't apply to its flex items flex shorthand declarations with unitless flex-basis values are ignored Column flex items don't always preserve intrinsic aspect ratios The default flex value has changed flex-basis doesn't account for box-sizing: border-box flex-basis doesn't support calc() Some HTML elements can't be flex containers align-items: baseline doesn't work with nested flex containers Min and max size declarations are ignored when wrapping flex items Inline elements are not treated as flex-items Importance is ignored on flex-basis when using flex shorthand Shrink-to-fit containers with flex-flow: column wrap do not contain their items Column flex items ignore margin: auto on the cross axis flex-basis cannot be animated Flex items are not correctly justified when max-width is used Flexbug #1 Minimum content sizing of flex items not honored Demos Browsers affected Tracking bugs 1.1.a – bug 1.1.b – workaround 1.2.a – bug 1.2.b – workaround Chrome (fixed in 72) Opera (fixed in 60) Safari (fixed in 10) Chrome #426898 (fixed) Chrome #596743 (fixed) Safari #146020 (fixed) When flex items are too big to fit inside their container, those items are instructed (by the flex layout algorithm) to shrink, proportionally, according to their flex-shrink property. But contrary to what most browsers allow, they're not supposed to shrink indefinitely. They must always be at least as big as their minimum height or width properties declare, and if no minimum height or width properties are set, their minimum size should be the default minimum size of their content. According to the current flexbox specification: By default, flex items won’t shrink below their minimum content size (the length of the longest word or fixed-size element). To change this, set the min-width or min-height property. Workaround The flexbox spec defines an initial flex-shrink value of 1 but says items should not shrink below their default minimum content size. You can usually get this same behavior by setting a flex-shrink value of 0 (instead of the default 1) and a flex-basis value of auto. That will cause the flex item to be at least as big as its width or height (if declared) or its default content size. Flexbug #2 Column flex items set to align-items: center overflow their container Demos Browsers affected 2.1.a – bug 2.1.b – workaround Internet Explorer 10-11 (fixed in Edge) When using align-items: center on a flex container in the column direction, the contents of flex item, if too big, will overflow their container in IE 10-11. Workaround Most of the time, this can be fixed by simply setting max-width: 100% on the flex item. If the flex item has a padding or border set, you'll also need to make sure to use box-sizing: border-box to account for that space. If the flex item has a margin, using box-sizing alone will not work, so you may need to use a container element with padding instead. Flexbug #3 min-height on a flex container won't apply to its flex items Demos Browsers affected Tracking bugs 3.1.a – bug 3.1.b – workaround 3.2.a – bug 3.2.b – workaround Internet Explorer 10-11 (fixed in Edge) IE #802625 (archived) In order for flex items to size and position themselves, they need to know how big their containers are. For example, if a flex item is supposed to be vertically centered, it needs to know how tall its parent is. The same is true when flex items are told to grow to fill the remaining empty space. In IE 10-11, min-height declarations on flex containers work to size the containers themselves, but their flex item children do not seem to know the size of their parents. They act as if no height has been set at all. Workaround By far the most common element to apply min-height to is the body element, and usually you're setting it to 100% (or 100vh). Since the body element will never have any content below it, and since having a vertical scroll bar appear when there's a lot of content on the page is usually the desired behavior, substituting height for min-height will almost always work as shown in demo 3.1.b. For cases where min-height is required, the workaround is to add a wrapper element around the flex container that is itself a flex container in the column direction. For some reason nested flex containers are not affected by this bug. Demo 3.2.a shows a visual design where min-height is required, and demo 3.2.b shows how this bug can be avoided with a wrapper element. Flexbug #4 flex shorthand declarations with unitless flex-basis values are ignored Demos Browsers affected 4.1.a – bug 4.1.b – workaround Internet Explorer 10-11 (fixed in Edge) Prior to the release of IE 10, the flexbox spec at the time stated that a flexbox item's preferred size required a unit when using the flex shorthand: If the <preferred-size> is ‘0’, it must be specified with a unit (like ‘0px’) to avoid ambiguity; unitless
Read the full README on GitHub

What Hacker News says

32 sources
For functional stuff, sure, but I don't think this is achievable within the UI domain. CSS rules have implementation details that change how you write it (some problems have workarounds), for example there's a documented set of issues in flex implementations maintained here: https://github.com/philipwalton/flexbugs It might be practical and possible to become mainstream for some domains, but it's doubtful for others. The most practical solution for UI is visual regression testing across browsers.
In Make formal verification and provably correct software practical and mainstream
This would center a fixed sized element in absolute position to page, this was never an issue. Problems start when you do not know size of your element and its parent. Flex finally fixes[1] this issue but it was not fully supported until recently[2]. [1] https://philipwalton.github.io/solved-by-flexbox/demos/verti... [2] https://github.com/philipwalton/flexbugs Most of the flexbugs are now fixed and flex should be recommended way of making layouts.
In How to Center in CSS (2015)
> the CSS required to make this demo work cross-browser is slightly different from the CSS shown in the example above, which assumes a fully spec-compliant browser. See the comments in the source for more details. The code: https://github.com/philipwalton/solved-by-flexbox/blob/maste... It've been great if he'd hooked up the page with caniuse to determine the best css to use for a individual's use case. See also his own flexbugs (https://github.com/philipwalton/flexbugs), which ironically is linked directly from caniuse's 'known issues'.
In Sticky Footer
>What makes Safari so bad in your eyes? The rendering engine is poor. It's probably the browser I have the most trouble with when doing frontend work. iframe scrolling is broken, it's historically suffered from some frustrating flexbox bugs (see https://github.com/philipwalton/flexbugs#flexbug-11), its Can I use... score lags behind Firefox and Chrome. For a while, it didn't support service workers properly. I could go on.
In Ask HN: What do you do on an Android phone that cannot be done on an iPhone?
There's no reason to not use CSS Grid, except for not knowing it well enough — and there's no reason not to learn it. Of those, only IE11 is relevant, as it's a desktop browser, on wider and taller viewports. Most of these browsers are mobile browsers on devices with narrow viewports, so even the default `display: block` fallback may be sufficient. If you have margins/paddings/widths etc which only make sense in the CSS Grid version, you can set these properties inside an `@supports` query https://developer.mozilla.org/en-US/docs/Web/CSS/@supports For IE11, it's a choice of presenting visitors with a slightly worse layout, to match the browser (https://philipnewcomer.net/2014/04/target-internet-explorer-... or, if you use Sass or PostCSS, using mixins that output CSS Grid properties with Flexbox as fallback. Its bugs are well-documented,
Read the rest
and most have workarounds https://github.com/philipwalton/flexbugs. Even inline-block can serve as a fallback, if you can avoid whitespace around tags in the markup (https://css-tricks.com/fighting-the-space-between-inline-blo...) A reasonable fallback doesn't need to match CSS Grid exactly. The whole point of media queries and responsive web design is that the website won't look exactly the same on all devices; it will look and work as good as it needs to look in that specific device.
In Tasks That Can Be Done with Pure HTML and CSS
I'm the author of one of these independent CSS libraries that has been in the front page of HN several times. I normally use the libraries I write quite a lot, and it speeds things up for myself. This is mainly because of the deep knowledge I have for them, but if other people find them interesting so let it be. Why would still make sense for skilled teams like yours? I can think several reasons: - Prototyping: Probably not everything you do is detailed development and you might want to throw a quick prototype with not-too-bad styles. It won't be groundbreaking, but the ROI of using a CSS framework for those normally pays off. - Cross-browser testing: an open source library will get bug reports from many varied places, and normally it's well tested cross-browser. Do you know about all of the flexbugs [1]? Do you even want to know? What ab
Read the rest
out the 2012 trick of Paul Irish for box-sizing [2]? Did you know it was updated in 2014 and how awesome this update is? - Documentation: when onboarding a new member on the team, if you are using one of the more popular libraries there is a large amount of documentation, github issues, stackoverflow questions and general articles on the web. While you might put the work to do this internally, even with great teams the internal documentation is normally very much worse than the OSS docs. - Other topics such as accessibility (color contrasts, keyboard states, etc) are normally polished in the libraries. It's not free, it comes after bug reports. For these reasons it doesn't make any sense that an experienced team build the whole CSS utilities from scratch for each project. So the only sensible thing as a company is to reuse some of the CSS through projects. Then you got an internal library! Why not open source it? You got one of those! Just look at the CSS [3] of "simple button" of my library, which already inherits half the style from a label. If I had to do buttons from scratch I'd forget at least 2 of those: the cursor pointer (because most links with .button would have it naturally, but not those with events and without href!) and the box-shadow to 0 (which only happens in some obscure combination of browser, device AND resolution). I just offloaded that knowledge long time ago into my library and now I focus on improving on other things :) [1] https://github.com/philipwalton/flexbugs [2] https://www.paulirish.com/2012/box-sizing-border-box-ftw/ [3] https://github.com/franciscop/picnic/blob/master/src/plugins...
In Spectre.css – A Lightweight, Responsive and Modern CSS Framework
> apparently doing a lot of googling finding the random stuff that IE11 doesn't quite support natively Do you genuinely think the need to lay stuff out in a grid or manage callback workflows is exotic? Have you done any front end development? > Your idea of IE11 support apparently revolves around people using the worst types of tech and coding practices No. As written in the comment you're replying to, it revolves around the huge gulf between IE11 support for current tech when compared to Edge/Chrome/Safari/Firefox. Some links: From https://rachelandrew.co.uk/archives/2016/11/26/should-i-try-... > "However, even where similar properties exist in the two versions of the specification, the capabilities of the older spec and implementation are very different to the new one. This means you can’t simply run Autoprefixer and consider the job do
Read the rest
ne." The flex implementation is similarly broken. https://github.com/philipwalton/flexbugs http://caniuse.com/#search=await The only reason I mention clipboard (despite being less common) is we use it on our own site and the cost of implementing a second implementation in Flash fix is ridiculous.
In Object-oriented Programming in vanilla JavaScript
If you've been following CSS grid at all, or if you look up anything related to it, you'll probably encounter something written by Rachel Andrew. She's been doing an incredible job at documenting and promoting CSS grid. In the past she wrote a CSS grid polyfill [0], but sadly it never got updated to the latest version of the spec. It'd be an easier sell if you could polyfill it reasonably on some older browsers, even if performance suffered a bit. Right now the last holdout is Edge [1], which is funny because they were the first to ship the older spec, going back as far as IE10 or IE11. Luckily, the next version will be shipping the latest spec. I've noticed autoprefixer [2] supports a grid option. I'd love a guide that explained any incompatibilities between the two versions. Getting a mostly working grid on IE11 and Edge would probably
Read the rest
make it an easier sell for many. When flexbox started growing popular there were guides showing you could support most features on IE10 and beyond with little effort if you used autoprefixer. Since there are equivalent versions of most attributes on older browsers, you just had to be aware of bugs and gotchas. For example, the default value for flex-grow, flex-shrink, and flex-basis (and their older equivalents) changed between versions, so if you always had to set them. In addition to any incompatibilities between versions, all implementations were buggy, so you had to be aware of bugs and their workarounds. Luckily, they're all well documented on the flexbugs [3] repo. Considering grid is more complicated than flexbox, I wouldn't be surprised to find it has a few bugs. Does anyone know if there's a gridbugs repo that developers can track? EDIT: After a quick search, I found a blog post [4] talking about supporting the older version. [0] https://github.com/FremyCompany/css-grid-polyfill/ [1] http://caniuse.com/#feat=css-grid [2] https://github.com/postcss/autoprefixer [3] https://github.com/philipwalton/flexbugs [4] https://rachelandrew.co.uk/archives/2016/11/26/should-i-try-...
In You don't need a grid framework on top of the CSS grid layout
I think you happen to not have encountered the bugs described here: https://github.com/philipwalton/flexbugs/blob/master/README.... 1. Minimum content sizing of flex items not honored (only fixed in Safari 10) 9. Some HTML elements can't be flex containers (not fixed) 11. Min and max size declarations are ignored when wrapping flex items (seems to be fixed only recently) 14. Flex containers with wrapping the container is not sized to contain its items (not fixed)
In Bootstrap 4 Alpha 6 Released

Showing the 15 most recent of 32 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.