ing the container with an inline style is all well and good, but unfortunately there is no inline style for pseudo elements. So we might end up with something like this:

//AN_Xml:

//AN_Xml:

Bummer.

//AN_Xml:

There is a solution though! While we are setting the inline style for the container, we can set an inline style for border-color too. Even though the container actually has no border, we can rely on inheritance to pass that color down to the pseudo element, which is treated like a child element.

//AN_Xml:
<div class="speech-bubble" style="border-color: pink; background: pink;">
//AN_Xml:   I like bananas, because they have no bones.
//AN_Xml:</div>
//AN_Xml:

Then in our code for the pseudo element, we'll specifically have it inherit the color:

//AN_Xml:
.speech-bubble:after {
//AN_Xml:   content: "";
//AN_Xml:   position: absolute;
//AN_Xml:   top: 100%;
//AN_Xml:   left: 20px;
//AN_Xml:   border-top: 20px solid black;
//AN_Xml:   border-top-color: inherit;
//AN_Xml:   border-left: 20px solid transparent;
//AN_Xml:   border-right: 20px solid transparent;
//AN_Xml:}
//AN_Xml:

Notice that I've applied inherit to border-top-color rather than the shorthand property border-top. For some reason (feel free to enlighten me) inherit doesn't work in the shorthand. Also note that when you override the the color with inherit, it doesn't "inherit" from the color set just above it (black), it inherits from its parent. So if you need a default, you'll need to set the border-color on the parent.

//AN_Xml:

View Demo

//AN_Xml:

Speech Bubble Arrows that Inherit Parent Color is a post from CSS-Tricks

]]> //AN_Xml: http://css-tricks.com/speech-bubble-arrows-that-inherit-parent-color/feed/ //AN_Xml: 31 //AN_Xml: //AN_Xml: //AN_Xml: A proposal to drop browser vendor prefixes //AN_Xml: http://felipe.wordpress.com/2012/02/02/a-proposal-to-drop-browser-vendor-prefixes/ //AN_Xml: http://css-tricks.com/a-proposal-to-drop-browser-vendor-prefixes/#comments //AN_Xml: Fri, 03 Feb 2012 21:49:25 +0000 //AN_Xml: Chris Coyier //AN_Xml: //AN_Xml: //AN_Xml: http://css-tricks.com/?p=16220 //AN_Xml:

Interesting idea by Felipe G on using a new at-rule, @-vendor-unlock, to tell the browser to use it's experimental implementation of any particular property, rather than using a vendor prefix on that property. Unfortunately at this point, even if you could get all the browsers on board, you'd need to use this and vendor prefixes to get deep support, which makes the problem worse. What we really need is for all browsers to implement auto-updating so eventually "supporting older …

A proposal to drop browser vendor prefixes is a post from CSS-Tricks

]]>
//AN_Xml: Interesting idea by Felipe G on using a new at-rule, @-vendor-unlock, to tell the browser to use it's experimental implementation of any particular property, rather than using a vendor prefix on that property. Unfortunately at this point, even if you could get all the browsers on board, you'd need to use this and vendor prefixes to get deep support, which makes the problem worse. What we really need is for all browsers to implement auto-updating so eventually "supporting older browsers" is something we can look back and laugh at.

//AN_Xml:

Direct Link to ArticlePermalink

A proposal to drop browser vendor prefixes is a post from CSS-Tricks

]]>
//AN_Xml: http://css-tricks.com/a-proposal-to-drop-browser-vendor-prefixes/feed/ //AN_Xml: 0 //AN_Xml:
//AN_Xml: //AN_Xml: //AN_Xml: or/">Speech Bubble Arrows that Inherit Parent Color is a post from CSS-Tricks

]]> //AN_Xml: http://css-tricks.com/speech-bubble-arrows-that-inherit-parent-color/feed/ //AN_Xml: 31 //AN_Xml: //AN_Xml: //AN_Xml: //AN_Xml: