[Webkit-unassigned] [Bug 49059] New: Unable to remove 'important' priority of a CSS property
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 5 01:29:19 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=49059
Summary: Unable to remove 'important' priority of a CSS
property
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Mac OS X 10.5
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: CSS
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: phnixwxz at gmail.com
Created an attachment (id=73043)
--> (https://bugs.webkit.org/attachment.cgi?id=73043&action=review)
test case
<!DOCTYPE html>
<html>
<head></head>
<body>
<div id='d1' style='background: yellow !important'>d1 should be red</div>
<div id='d2' style='background: yellow !important'>d2 should be red</div>
<div id='d3' style='background: yellow !important'>d3 should be red</div>
<script>
// 1. Unable to change value of an important property by setting JS property.
var d1 = document.getElementById('d1');
d1.style.background = 'red';
// 2. Unable to change value of an important property with setProperty().
var d2 = document.getElementById('d2');
d2.style.setProperty('background', 'red');
// 3. The 'important' priority still remains even if the property is removed with removeProperty().
var d3 = document.getElementById('d3');
d3.style.removeProperty('background');
d3.style.setProperty('background', 'red', '');
// The following will succeed:
// d3.style.setProperty('background', 'red', 'important');
// or
// d3.style.background = 'red !important';
</script>
</body>
</html>
Firefox also behaves like WebKit. However, the behavior seems unreasonable and not to comply with the draft CSSOM standard. http://dev.w3.org/csswg/cssom/#the-cssstyledeclaration-interface
Anyway, I agree to delay fixing this issue until the CSSOM standard is frozen.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list