Open tpreusse opened 8 years ago
This is pretty weird, and isn't really an issue with Radium or inline-style-prefixer
.
You can reproduce this without any javascript at all, here's a JSBin to demonstrate: http://output.jsbin.com/yayoce
When you set -ms-flex
with !important
in IE10, the !important
isn't respected in the -ms-flex-preferred-size
that IE10 uses as the computed style.
To fix your issue right now, you could use individual flex properties instead of the shorthand, which would work around this.
I'm not completely sure if Radium or inline-style-prefixer
should care about this case. We could always split flex rules into individual declarations. Part of me thinks we should just document it as a known edge case since it's not our bug, but given that we rely on !important
it might be worth fixing.
/cc @ianobermiller @rofrischmann @tptee
+1 on the docs
Thanks for looking into this.
Interesting so the browser expands -ms-flex
to those multiple styles? I thought inline-style-prefixer
would go from flex
to the "IE long form".
And because it works in aphrodite
with inline-style-prefixer
I assumed it's Radium specific but it actually just works there because both style (outside and inside the media query) are missing !important
and are in a style tag (no need to force it).
Yeah, it's pretty wacky.
I'm conflicted on this one. It's a weird edge case, which makes me think let's document it and move on, but it's also one that might be relatively common due to our necessary !important
usage, which makes me think we should work around it so that users don't have to.
I'm running into something similar when using -webkit-background-clip
. If the property value is text
, the property shows up, but when using text !important
, it gets stripped out completely.
-ms-flex-preferred-size
is missing!important
within the media query style tag.Not sure if it's a
inline-style-prefixer
or Radium issue. But I assume Radium adds!important
to ensure the media query overwrites the inline styles.Example
Produced CSS in IE10
Make sure to use
document.querySelectorAll('style')[0].styleSheet.cssText
to debug style tags in IE10 –innerText
,innerHtml
and dev tools do not provide the latest rules.Currently
Desired