Question about style:opacity behavior

Hi,
According to chapter 7.6.3.3.2.41 of specification, style:opacity is applied to content elements. Exact description is the following:
“The opacity property is used to determine how to blend the background color and marks of areas produced by an element with the current composite rendering.”

HDiSim (ver. 061005-0100) doesn’t apply style:opacity to text – text is always opaque.
At the same time opacity is applied to style:border.
Should style:opacity be applied to text element in the following example
Should style:opacity be applied to border
What about "marks of areas", what does it mean

<div id="Div1" style:backgroundColor="blue" style:opacity="0.2" style:x="10px" style:y="100px" style:position="absolute" style:width="200px" style:height="200px" style:border="2px solid red">
<p>Text Sample</p>
</div>

Thanks in advance



Answer this question

Question about style:opacity behavior

  • Rathish P S

    Should it I'm not sure - that might be up for debate. Does it No.


  • LudHouse

    In your example above, opacity will be applied to the border but not the text. Opacity is not implicity inherited. In any case, even explicitly inheriting the opacity or explicitly setting the opacity on the p tag does not work in any version of the simulator (although, per the spec it is supposed to).
  • spree

    Note that if you explicity give a color with an alpha of less than 255 (using rgba()), it will be semi-transparent.

    Not sure if the lack of opacity is just a bug in the current simulator or not (and I am not at work right now)



  • R Raghu

    Neither the MS simulator no the Toshiba emulator apply opacity to the text. I wish they did, but they don't.


  • Siteadm

    If you just need your text to have opacity, Peter is right - use an rgba value (where a is alpha) on your color style attribute.

    Using the opacity style element, however, is not inherited by your p tag - which means you can use it for things like fading animations :(




  • Question about style:opacity behavior