Last Comment Bug 93156 - Implement 'opacity' according to the spec (transparency)
: Implement 'opacity' according to the spec (transparency)
: css3
Product: Core
Classification: Components
Component: CSS Parsing and Computation (show other bugs)
: Trunk
: All All
P2 enhancement (vote)
: mozilla1.7beta
Assigned To: David Baron :dbaron: ⌚️UTC-8
: Hixie (not reading bugmail)
: Jet Villegas (:jet)
: 58517 (view as bug list)
Depends on: 212366 228441
  Show dependency treegraph
Reported: 2001-08-01 15:52 PDT by Pierre Saslawsky
Modified: 2004-02-27 10:53 PST (History)
17 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch (9.02 KB, patch)
2004-02-23 16:28 PST, David Baron :dbaron: ⌚️UTC-8
bzbarsky: review+
roc: superreview+
Details | Diff | Splinter Review

Description User image Pierre Saslawsky 2001-08-01 15:52:18 PDT
This bug is extracted from bug 58517.  Dbaron wrote:

The '-moz-opacity' property doesn't match the recommendation for 'opacity':

'-moz-opacity' is inherited and applies only to any painting done for the element 
(at least it did the last time I checked)

'opacity' is not inherited and should apply to the entire subtree drawn by the

The former is totally wrong and only works reasonably in certain simple cases.


I looked into the way we use '-moz-opacity' and it doesn't seem that we are 
already taking advantage of the difference between the two definitions. So, 
unlike what I wrote in bug 58517 [2001-07-17 16:31], the way to go would be to 
fix '-moz-opacity' when we can, and rename it to 'opacity' as soon as the spec 
becomes a recommendation.
Comment 1 User image Pierre Saslawsky 2001-08-01 15:53:31 PDT
*** Bug 58517 has been marked as a duplicate of this bug. ***
Comment 2 User image Markus Hübner 2003-03-04 09:26:03 PST
What are the current plans - intending to further develop -moz-opacity or 
focus on being according to the spec?
Comment 3 User image louis bennett 2003-05-15 12:48:06 PDT
URL of [now published] spec should be:

(sorry, i don't have the privs to add it myself.)
Comment 4 User image Brett Donald 2003-07-17 16:25:45 PDT
The CSS3 Color module has now moved to Candidate Recommendation. Can we proceed 
to fix this bug now?
Comment 5 User image David Baron :dbaron: ⌚️UTC-8 2003-07-17 16:51:21 PDT
This is basically a duplicate of bug 212366, but this can cover renaming
'-moz-opacity' to 'opacity' while still supporting '-moz-opacity' (at least for
a while).
Comment 6 User image David Baron :dbaron: ⌚️UTC-8 2003-11-17 12:15:34 PST
Taking to cover the renaming, which should wait until it works on Mac.
Comment 7 User image alanjstr 2004-01-28 20:00:33 PST
adding transparency synonym
Comment 8 User image David Baron :dbaron: ⌚️UTC-8 2004-02-23 16:28:57 PST
Created attachment 142085 [details] [diff] [review]

I've tested that each of the following:


work both without any of the following and after each of them:

javascript:void(document.body.setAttribute("style", "opacity: 0.8"));
javascript:void(document.body.setAttribute("style", "-moz-opacity: 0.6"));
javascript:void( = "0.2");
javascript:void( = "0.4");
Comment 9 User image Robert O'Callahan (:roc) (email my personal email if necessary) 2004-02-23 19:27:35 PST
Comment on attachment 142085 [details] [diff] [review]

It doesn't quite work according to spec yet (e.g., multiple boxes for the same
element aren't collapsed into the same opacity group) but I agree it's good
Comment 10 User image Boris Zbarsky [:bz] (still a bit busy) 2004-02-23 21:48:46 PST
Comment on attachment 142085 [details] [diff] [review]

Comment 11 User image David Baron :dbaron: ⌚️UTC-8 2004-02-23 23:39:00 PST
Fix checked in to trunk, 2004-02-23 22:48 / 23:37 -0800.
Comment 12 User image Zibi Braniecki [:gandalf][:zibi] 2004-02-24 02:19:34 PST
Robert, is there any bug related to that problem?
Comment 13 User image Hixie (not reading bugmail) 2004-02-24 02:31:44 PST
+           attribute DOMString        Opacity;

Shouldn't that be 'opacity'? (lowercase)
Comment 14 User image Gérard Talbot 2004-02-24 08:04:44 PST
Folks, I believe it should be "opacity" and not "Opacity", like this: = strValue;

My 2 cents
Comment 15 User image Robert O'Callahan (:roc) (email my personal email if necessary) 2004-02-24 10:45:58 PST
oops yeah, missed that. It should be lowercase.

Zbigniew, I don't think there's a bug on that. I'm planning to fix it as part of
some significant painting changes that I'm working on.
Comment 16 User image David Baron :dbaron: ⌚️UTC-8 2004-02-24 11:00:08 PST
Case corrected.

Note You need to log in before you can comment on or make changes to this bug.