W3C home > Mailing lists > Public > www-style@w3.org > October 2013

RE: objection re: RESOLVED: setProperty's handling of importance logically behaves same as appending a declaraiton (like IE/WebKit)

From: François REMY <francois.remy.dev@outlook.com>
Date: Tue, 22 Oct 2013 22:30:41 +0200
Message-ID: <DUB120-W2693BF9EED711B15110F8EA5020@phx.gbl>
To: Zack Weinberg <zackw@panix.com>, "L. David Baron" <dbaron@dbaron.org>
CC: www-style list <www-style@w3.org>
I would like to bump this up:
> From: zackw@panix.com
> I think this rationale is trumped by the code presented elsethread by
> Remy, demonstrating that there is code in the wild expecting the
> current Gecko behavior (whereas no one has presented code expecting
> the Webkit behavior).
|  Summary of the issue: 
|  - browsers are currently inconsistent, but given the new spec:
|  - setProperty('property','','')
|        does reset any proprety
|  - setProperty('property','value','') 
|        sets the property only if it is not currently !important
|        otherwhise, it is silently ignored (does not throw).
|  - the only way to 'unset' the important flag is to remove the 
|        property, then readd it.
|  - given the rarity of the situation, inconsistencies between browsers,
|         existing documentations that clearly do not specify this behavior
|         at all, and a function name that cannot even be interpreted that
|         way, developers assume it's okay to "backup & set again". It works
|         in some browsers in all cases, in all browsers in most cases. 
|  - I would like to protect this assumption.
Use cases, existing documentation, and in-use code all lean towards a "clean" set semantics. I do not support the new proposed setProperty behavior, and I believe this should be discussed again with the new information this thread yielded in mind.
I do recognize there will soon be a need for a new "append rule" semantic, but it can easily be solved by the addition of a new function ("appendProperty") and does not require redefining the existing semantics of the "set" operation, and certainly not the JS-facing side of it.
When facing a case like this, please favor fixing the web (gecko behavior) to introducing more quirks to it (webkit behavior).
Best regards,
Received on Tuesday, 22 October 2013 20:31:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:03 UTC