Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

fix unitless flex-basis bug on some older devices #83

Merged
merged 1 commit into from Jun 19, 2017
Merged

fix unitless flex-basis bug on some older devices #83

merged 1 commit into from Jun 19, 2017

Conversation

wad3g
Copy link
Contributor

@wad3g wad3g commented Jun 18, 2017

Fix issue #81 where flex-basis: 0 is unitless and interpreted as a syntax error.

If the is ‘0’, it must be specified with a unit (like ‘0px’) to avoid ambiguity; unitless zero will either be interpreted as as one of the flexibilities, or is a syntax error.

W3C - CSS Flexible Box Layout Module

Screenshot using Samsung Galaxy S5:

samsung

One potential problem with this solution is minification. Most minifiers will change 0px -> 0. I've already tried using 0%, but that didn't work.

@Chalarangelo
Copy link
Owner

Wow, thanks! That is a really good solution, I'll check if my Sass preprocessor tears this one apart and figure out what to do about it, so that it does not turn it into 0px.

@Chalarangelo
Copy link
Owner

Update

My preprocessor does not mess up (0px is not compiled down to 0), meaning this should be pretty easy to fix by just recompiling all flavors. It should also be noted that flavor maintainers and people who do tweak their own files will not get into trouble as far as I can tell if they use the setup described in the documentation, which is a relief!

@Chalarangelo Chalarangelo merged commit e253f7c into Chalarangelo:master Jun 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants