- From: Simon Sapin <simon.sapin@kozea.fr>
- Date: Wed, 13 Jun 2012 09:43:11 +0200
- To: "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>
- CC: "Tab Atkins Jr." <jackalmage@gmail.com>, WWW Style <www-style@w3.org>
Le 13/06/2012 04:35, Kang-Hao (Kenny) Lu a écrit : > Ah, I noticed that "raise"s in the source of tinycss but that the > "except:"s. So am I right that changing what's previously called "Core > Grammar" in CSS 2.1 would not break any use of tinycss since all such > error would have been caught? First: I’ll call "UA" instead of "user" any software that uses tinycss as a library, to avoid confusion with the UA’s own end-user. Changing the grammar and updating tinycss accordingly would not make tinycss raise more exceptions (visible to the UA), but it will most likely change the API and "break" UAs that relied on the order version of the API. For the example given earlier in this thread: property values appear in the API as a list of Token objects, each with a 'type' attribute. Removing the INTEGER type and adding an is_integer on NUMBER tokens instead is a backward-incompatible change in the API. > I think I just mis-cited "tinycss" as a tool that might break if the > $foo proposal is accepted[1]. > > [1]http://lists.w3.org/Archives/Public/www-style/2012Jun/0085 It really depends on how the change is implemented. For this particular change a new VariableDeclaration object could be added, or an is_variable flag could be added to Declaration objects. In either case, UAs that expect the older API will most likely "break": behave incorrectly on some inputs. It might kind of work if I just use normal Declaration objects with a name that starts with $, but then '$foo: bar' would be the same as '\$foo: bar' so this would be a bad choice. > I just made early (and wrong) judgments when I saw the "raise"s. Sorry > about the confusion. No problem :) -- Simon Sapin
Received on Wednesday, 13 June 2012 07:43:45 UTC