- From: Brian Birtles <bbirtles@mozilla.com>
- Date: Tue, 07 May 2013 12:28:17 +0900
- To: Steve Block <steveblock@google.com>
- CC: "Tab Atkins Jr." <jackalmage@gmail.com>, "public-fx@w3.org" <public-fx@w3.org>
(2013/05/07 11:49), Tab Atkins Jr. wrote: > On Mon, May 6, 2013 at 7:09 PM, Brian Birtles <bbirtles@mozilla.com> wrote: >> * Authors may expect the same syntax is available in their CSS keyframes >> (i.e. '50px add'). We'd need feedback from the CSS WG that they are ok with >> this syntax even if they don't add it immediately. This may be problematic >> since it requires changes to parsing. I *think* Tab said this wouldn't fly >> but that may have been with regards to the previous '+50px' proposal. Tab? >> >> * Reading or writing the composition mode of a value would require string >> parsing. > > Yeah, I'm against the change for this reason. The property value > should be just a property value; intermixing in more syntax makes it > harder to work with for both implementors and JS-wielding authors in > return for a small terseness gain. > > If we want to make the compositing op optional, then this *definitely* > won't fly, as "add" or "replace" might very well be valid components > of a property value, so we can't tell whether the comp-op was omitted > or not without ambiguity. Thanks Tab for the quick feedback. Steve, a further idea occurred to me: make the composition operation a property of the keyframe. The reasons for this are two: 1) It would mean you could specify the composition operation using the shortcut interface by treating 'composite' specially just like we do for 'offset'. 2) It makes mapping to CSS easier. Since we can't change what goes on the RHS of a style declaration in a keyframe rule I think it would be difficult to expose per-value composition operations there. However, per-keyframe composition operations should be easy: @keyframes abc { 50% { left: 50px; animation-composite: add; } ... } If you really wanted to have, at offset 0.7, a value for 'left' that is additive and a value for 'top' that is absolute, then you could achieve that by putting two keyframes at offset 0.7 with different composition operations. We already have rules for dealing with keyframes at the same offset. What do you think? Brian
Received on Tuesday, 7 May 2013 03:28:45 UTC