PIE
PIE copied to clipboard
Implement RGBa for Border-Color
It would be really cool to have access to RGBa for Border-Color.
Thanks for the feature request. I've considered this but here is the difficulty:
Like the background properties, IE also natively recognizes the various border/border-color/etc. properties. So if it encounters a border-related style in the CSS which contains an rgba color, it will attempt to parse it, fail, and fall back to some default.
I got around this for backgrounds by introducing -pie-background. I could do something similar, however: -pie-border wouldn't work because it's not expressive enough (it's actually a shorthand-of-shorthands and doesn't allow different colors per side.) To make it fully expressive I guess we'd have to do -pie-border-color which would override only the border-color component of the fallback...
.myEl {
border: 1px solid rgb(125,125,125); /*fallback*/
border: 1px solid rgba(125,125,125,.5); /*CSS3 browsers*/
-pie-border-color: rgba(125,125,25,.5); /*PIE - would pick up style and width from the fallback above, NOT the CSS3 browsers line*/
}
This feels a bit awkward. Perhaps better than nothing though. We could also add -pie-border-style and -pie-border-width shorthand overrides if needed.
Thanks for the feedback. Because PIE would only be handling the color rendering, I think it would be cool to do the -pie-border-color
property. It seems to be the most logical to me as an outside, but then again, I'm usually wrong...
I'll second a -pie-border-color property. Definitely added value with this one!