New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-motion][css-logical-props] offset-* property names collide with logical properties #51
Comments
I think if offset-* properties collide with logical properties, then it will be the result of the 'offset' ; the shorthand property. @fantasai Will it matter with the current spec of Motion Path? |
I also noticed that the 'offset' shorthand property name collides with Web Animations which gives special meaning to the names 'offset', 'easing', and 'composite' when setting up keyframes. We figured that no-one would ever create a CSS property named 'offset' 😉. I guess we'll need to add special handling to Web Animations to recognize |
We discussed this during the recent face-to-face meeting at TPAC. I think the decision was that it was better to rename the logical properties as there are no shipping implementations. @fantasai does this match your recollection? |
Firefox has been shipping |
It is related to the shorthand property Sebastian |
That will teach me to rely on caniuse.com :( I guess we have a problem then... |
@heycam wait, the logical properties specification is only an editors draft? |
We did discuss that prior to shipping. |
Not sure why but Shane moved that discussion to www-style. Sebastian |
Before using |
Was there a conclusion to this discussion? Chrome has shipped support for the new names, although they still don't support the full spec. I thought of it again while reading up on the Web Animations API. As @birtles briefly mentioned above: WAAPI uses Regardless, if the decision is to go with the current names, it would be nice to get a resolution & close this issue. Or if the issue is open until the logical properties spec is updated, at least mark the resolution about the offset/motion property names. * Short version of that conflict: The following CSS keyframes: @keyframes {
20% {color: blue; opacity: 1}
70% {color: pink: opacity: 0.5}
} can be written for WAAPI as: element.animate([
{ color: "blue", opacity: 1, offset: 0.2 },
{ color: "pink", opacity: 0.5, offset: 0.7 },
], duration); Which happens to look an awful lot like how you'd try to write a keyframe animating an And yes, this was perhaps a poor API design choice for that spec, see w3c/web-animations#164 for discussion. But it's already shipped in 2 browsers. |
Yes, at the time we said, "Surely no one will ever mint a CSS property as generic as 'offset'". 😬 (There was even a spec issue about this contemplating using |
(Actually, maybe not. It could be quite convenient to specify the shorthand in keyframes too I guess.) |
I concur, folks will probably try to animate offset, same as they animate
background (instead of backbround-color).
|
Like 'float', we can't use the name 'offset' as that already has another meaning. So, like 'cssFloat', we use 'cssOffset' instead. Discussed in FXTF issue and on blink-dev. w3c/fxtf-drafts#51 (comment) https://groups.google.com/a/chromium.org/d/msg/blink-dev/_DPl-JG6bV8/HXkK-CwfEQAJ
Generated from: commit d06587c Merge: 0054b82 47b0038 Author: Brian Birtles <birtles@gmail.com> Date: Fri Mar 10 15:56:10 2017 +0900 Merge pull request #182 from ewilligers/cssOffset CSS Property 'offset' is IDL attribute 'cssOffset' commit 47b0038 Author: Brian Birtles <birtles@gmail.com> Date: Fri Mar 10 15:55:38 2017 +0900 Update changelog and acknowledgements commit b0c713e Author: ericwilligers <ericwilligers@chromium.org> Date: Fri Mar 10 15:14:31 2017 +1100 CSS Property 'offset' is IDL attribute 'cssOffset' Like 'float', we can't use the name 'offset' as that already has another meaning. So, like 'cssFloat', we use 'cssOffset' instead. Discussed in FXTF issue and on blink-dev. w3c/fxtf-drafts#51 (comment) https://groups.google.com/a/chromium.org/d/msg/blink-dev/_DPl-JG6bV8/HXkK-CwfEQAJ
The Web Animations spec now uses cssOffset. I suspect this issue can be closed. |
Though the initially mentioned conflict between the property names of Motion Path and Logical Properties still exists. @shans wrote earlier that this issue was discussed at TPAC, though as far as I can see there was no final decision on this yet. Sebastian |
The CSS Working Group just discussed
The full IRC log of that discussion
|
Is the "box" namespace available (something like |
Another suggestion we had after the f2f was 'inset' (i.e. inset-block-start, inset-inline-end, etc.) |
There's a thread of suggestions at https://twitter.com/csswg/status/855306526973612032 but I think so far 'inset' is the best suggestion. I've edited that into the logical properties draft as a placeholder for now; we still need to resolve on that and FPWD for that module. |
@fantasai Could we close this issue? |
As fantasai wrote in her last comment, there still needs to be a decision made how to name the logical properties. Having said that, I think it's fine to close this one, as the naming conflict was already resolved, and create a new one to discuss the naming of the Sebastian |
The
motion-*
properties defined in the Motion Path Module got renamed tooffset-*
recently:This resulted in a naming conflict with the CSS Logical Properties spec., which defines some
offset-*
properties referencing thetop
,left
,bottom
andright
properties from CSS 2.1:This may cause some confusion for web authors when they use those properties. To avoid any confusion, the properties should be renamed again (or the ones in CSS Logical Properties).
Sebastian
The text was updated successfully, but these errors were encountered: