Closed Bug 293821 Opened 20 years ago Closed 20 years ago

Custom CSS properties not retrievable by getComputedStyle getPropertyCSSValue getPropertyValue

Categories

(Core :: DOM: CSS Object Model, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 188321

People

(Reporter: ed, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050504 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050504 Firefox/1.0+

Custom properties specified in a style declaration are not retrievable via
script calls to document.defaultView.getComputedStyle().

Reproducible: Always

Steps to Reproduce:
Define a custom style:

.mybutton {
  -me-my-prop: true;
}

Try to retrieve it from an element it's been applied to:

var my_prop = document.defaultView.getComputedStyle(my_elem,
"").getPropertyValue("-me-my-prop");


Actual Results:  
no value retrieved

Expected Results:  
the value should have been retrieved

While the CSS spec says that the user agent can ignore property indentifiers
that it does not understand, with XBL, Mozilla should not assume that a property
not in it's internal list of supported properties might not be used by an XBL
binding.  Properties that follow the vendor extension syntax
(http://www.w3.org/TR/CSS21/syndata.html#q4) should at least be preserved and
retrievable by scripts.
Next time use search. "custom CSS" would have located the bug this is a
duplicate of. Thanks.

*** This bug has been marked as a duplicate of 188321 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.