Skip to content
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

MDN incorrectly says some CSS properties support animations that actually don’t: “direction”, “text-orientation”, “unicode-bidi” (maybe more) #584

Closed
nt1m opened this issue Jun 1, 2022 · 12 comments · Fixed by #660
Assignees
Labels
Content:CSS idle Issues and pull requests with no activity for three months.

Comments

@nt1m
Copy link

nt1m commented Jun 1, 2022

MDN URL

https://developer.mozilla.org/en-US/docs/Web/CSS/direction

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

MDN says the CSS property supports discrete animations.

What did you expect to see?

The spec says the direction CSS property is not animatable: https://drafts.csswg.org/css-writing-modes/#direction

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@nt1m
Copy link
Author

nt1m commented Jun 1, 2022

@nt1m
Copy link
Author

nt1m commented Jun 1, 2022

Same issue with unicode-bidi

@teoli2003
Copy link
Member

Discrete animation or not-animatable can be very close.

The question here is: what do browsers do? Do they ignore the rule or do they jump to the new value?

There may be a difference between the spec and the implementations.

@nt1m
Copy link
Author

nt1m commented Jun 1, 2022

@teoli2003 WebKit does not support animations for the properties I cited.

not animatable = jumps directly at 0s
discrete = jumps depending on the animation duration/timing-function

@sideshowbarker sideshowbarker changed the title direction CSS property does not support animations MDN incorrectly says some CSS property support animations that actually don’t: “direction”, “text-orientation”, “unicode-bidi” (maybe more) Jun 1, 2022
@sideshowbarker sideshowbarker changed the title MDN incorrectly says some CSS property support animations that actually don’t: “direction”, “text-orientation”, “unicode-bidi” (maybe more) MDN incorrectly says some CSS properties support animations that actually don’t: “direction”, “text-orientation”, “unicode-bidi” (maybe more) Jun 1, 2022
@teoli2003 teoli2003 transferred this issue from mdn/content Jun 1, 2022
@teoli2003
Copy link
Member

We have numerous discrete usages that are wrong. I'm looking for a way to have the list of properties where this is actually correct, so I can fix the others. Both CSSTree and w3c/webref use our data for this, I believe.

@sideshowbarker @dontcallmedom Any idea how we could extract this info from the spec? I could try an awk script if nothing obvious appears.

@dontcallmedom
Copy link
Contributor

webref never uses data from MDN, and it does collect info from specs on this property, e.g. https://github.com/w3c/webref/blob/main/ed/css/css-writing-modes.json says "direction": { "animationType": "not animatable" }

@sideshowbarker
Copy link
Contributor

sideshowbarker commented Jun 2, 2022

@sideshowbarker @dontcallmedom Any idea how we could extract this info from the spec? I could try an awk script if nothing obvious appears.

webref never uses data from MDN, and it does collect info from specs on this property, e.g. https://github.com/w3c/webref/blob/main/ed/css/css-writing-modes.json says "direction": { "animationType": "not animatable" }

Given that, it seems like walking the https://github.com/w3c/webref/tree/main/ed/css data is way to programmatically get the authoritative data. But I suppose the remaining hard part is to then come up with some way to programmatically audit the corresponding existing data in mdn/data to identify all the places where it’s wrong.

But I guess a higher-level takeaway from this is, for MDN in the long term, it looks like this is another reminder that we need to seriously consider moving away from manually maintaining the data in mdn/data, and instead switch over to just using data from webref directly.

And maybe that’s something that should be considered for adding to the WebDocs prioritization list — and perhaps also for the Steering Committee to discuss. (Or maybe it’s already been discussed and is already on the prioritization list…)

@teoli2003
Copy link
Member

Thanks a lot, both of you! Yes, we want to move away from using mdn/data. This Quarter, the {{CSSSyntax}} macro stopped using it (and used w3c/webref). I will look to fix the current data for the animation entries and study and open a project for generating these tables from w3c/webref instead of mdn/data (Read: updating the {{CSSInfo}} macro).

The work done on the macro by @wbamberg will help a lot to fix this one. Handling l10n is something that is specific to {{CSSInfo}}, which I think a new system is getting added to Yari.

@teoli2003 teoli2003 self-assigned this Jun 2, 2022
@wbamberg
Copy link
Contributor

wbamberg commented Jun 2, 2022

CSSSyntax update is not merged yet but it is so close. I have thought a bit about CSSInfo and it will be tricky to replicate all the same data as we currently have, partly because some of it is really prose masquerading as data. But we should switch to webref anyway, even if we can't support all the same things.

@lahmatiy
Copy link
Contributor

lahmatiy commented Jun 2, 2022

I'm just wonder, what about intermediate, proprietary and legacy extensions to the syntaxes? W3C specs are providing syntaxes in their "ideal" form, which are crystalized over the time even through several spec levels. Browsers implemented some parts of W3C specs during the specs evolution, and some things were discarded from specs but still working in browsers, at the same time some new things (which are by specs in their final form) are not.
Using webref "as is" for MDN web docs or a CSS syntax validation is not appropriate. Current state of mdn/data is more suitable for these purposes. Imho, webref -> mdn/data sync in one way or another is a single working solution here.

@teoli2003
Copy link
Member

Yes, that's another reason to start with webref -> mdn/data.

But using directly webref doesn't prevent us to have an exception list. We do this for specs.

@teoli2003
Copy link
Member

Anyway, we need to be sure not to have circular dependencies MDN -> CSSTree -> MDN (for example).

@github-actions github-actions bot added the idle Issues and pull requests with no activity for three months. label Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS idle Issues and pull requests with no activity for three months.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants