1
1
mirror of https://github.com/primer/css.git synced 2024-11-28 13:12:16 +03:00

docs: add docs for flexbug no. 9

This commit is contained in:
Shawn Allen 2019-11-21 13:30:09 -08:00 committed by GitHub
parent ee31cbca4e
commit a65a327f21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -744,6 +744,8 @@ Here is an example of a media object that is **vertically centered on large scre
## Flexbox bugs
This section lists flexbox bugs that affect browsers we currently support (**citation needed**).
This section lists flexbox bugs that affect [browsers we currently support](https://github.com/primer/css/blob/master/.browserslistrc).
**1. Minimum content sizing of flex items not honored:** Some browsers don't respect flex item size. Instead of respecting the minimum content size, items shrink below their minimum size which can create some undesirable results, such as overflowing text. The workaround is to apply `flex-shrink: 0;` to the items using `d-flex`. This can be applied with the `flex-shrink-0` utility. For more information read [philipwalton/flexbugs](https://github.com/philipwalton/flexbugs#1-minimum-content-sizing-of-flex-items-not-honored).
1. **Minimum content sizing of flex items not honored.** Some browsers don't respect flex item size. Instead of respecting the minimum content size, items shrink below their minimum size which can create some undesirable results, such as overflowing text. The workaround is to apply `flex-shrink: 0;` to the items using `d-flex`. This can be applied with the `flex-shrink-0` utility. For more information read [philipwalton/flexbugs](https://github.com/philipwalton/flexbugs#1-minimum-content-sizing-of-flex-items-not-honored).
9. **Some elements can't be flex containers.** Specifically, `<button>`, `<fieldset>`, and `<summary>` elements cannot be styled with `display: flex` in Safari. Instead of using `class="d-flex"` on these elements, you should nest an element within them, e.g. `<summary><div class="d-flex">...</div></summary>`.