mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-12 17:34:16 -04:00
We use flexbox to lay out the counts of sending/delivered/failed on the activity and job pages. flexbox makes the best use of the space when the numbers can be significantly different widths (eg 0 sending, 5000 delivered). Flexbox was only supported from IE 11 onwards [1]. And since we were setting the `display` property of the individual numbers to `block` they were rendering one-per-line on browsers that don’t support flexbox. This commit changes these items to be floated and a predefined width. In browsers that support it, flexbox seems to override these hard-coded widths. It’s not quite as good as the flexbox solution because: - it doesn’t adjust the widths in the nice way that flexbox does - it’s hard-coded to expect 4 items (we don’t have this component with any other number of items at the moment, so it won’t actually break anything) But it’s pretty much OK because: - it’s a lot better than the before - IE 8 and 9 combined only make up 5% of our users, and this will be a declining number - polyfilling flexbox would mean using Javascript, and we don’t serve working Javacript to IE 8 users anyway 1. http://caniuse.com/#feat=flexbox