Replies: 7 comments 23 replies
-
Do we update these pages as soon as a new version of the spec lands, some browser implements it, or someone creates an issue\PR on GitHub?
The GitHub issue is complaining about the description on the page doesn't match the syntax. So logically the syntax should match whatever is documented on the page irrespective of the "current" or "the latest" versions. When the syntax doesn't match, the syntax section is not useful to the reader because there is no explanation for extra(new) values or creates doubts about missing(old) values.
+1 Current workflow is to create a PR in content repo and at the same time create a PR in BCD repo. This keeps content and compatibility in sync. Having syntax hint/URL in BCD will easily keep syntax in sync as well.
We can have a new optional field Or the version or spec location that the author wants to use can be passed to the macro call. This will keep the syntax bound to the surrounding content.
For now we can have a tool and nightly/weekly workflow to check Values section using webref/css. We can check for number and structure of values against the latest available syntax. And flag mismatches as a GitHub issue. |
Beta Was this translation helpful? Give feedback.
-
Thanks for considering this @wbamberg - initially I was wondering whether a bcd or webref solution would fit, so we don't have to hand curate further data which in my ideal world would be automated :) However I really like @OnkarRuikar 's solution here
Whilst I'm also against adding too much to frontmatter incase it gets overly complicated, this seems like a nice solution, used as an override essentially |
Beta Was this translation helpful? Give feedback.
-
Yeah, I think you are right.
Yes, I think if we change the csssyntax policy to use more bleeding edge specs this is a question we'd have to look into. In general though I think it is OK for formal syntax to list things that aren't supported: it's BCD's job to tell that story.
Sometimes a CSS property is defined across multiple different specs (rather than multiple versions of the same spec). The way these appear in webref/css is that one spec has the syntax for the property in its So for example, This might seem like a legitimate case for BCD to list multiple specs? In these cases, sometimes BCD does list multiple specs ( Would it be practical to use webref to get spec URLs, instead of BCD? (I mean for the spec table too, not just the formal syntax). |
Beta Was this translation helpful? Give feedback.
-
There is always going to be some odd cases. We need to have some override mechanism for special cases. Can we have an optional parameter to the macro
In this case are we going to downgrade the document to match |
Beta Was this translation helpful? Give feedback.
-
No. We can list the unnumbered version in BCD, because as Florian says this is evergreen: it won't go stale as new spec versions ship. But we can use browser-specs to find, from the unnumbered version, both the current full version and the latest delta. |
Beta Was this translation helpful? Give feedback.
-
How about this: For any CSS property/type/etc.,
Listing syntaxes from latest specs also requires that BCD not only lists what has been implemented, but also what has not been yet. This requirement should better be emphasized in BCD's contributing guide, in my opinion. For staleness of the "Values" section, I'm thinking about this procedure:
An issue is that literal comparison of |
Beta Was this translation helpful? Give feedback.
-
I gave this another re-read today and am collating my thoughts moving forward. I jumped on the bcd call today to get a feel of thoughts there as well as that seems to be quite integrated into this discussion - for instance:
Maybe not? But I would ask how high we think the priority is for solving the issue as it stands at the moment, which is discrepancies on pages. Do we want a short term solution, while we consider a more robust longer term one which (probably) involves influencing bcd? |
Beta Was this translation helpful? Give feedback.
-
This came out of mdn/content#28900, which has come up before, although I can't find the other one now.
The CSSSyntax macro uses @webref/css to display formal syntax for CSS properties. In this algorithm, we find all specs in webref that include a property, and exclude any specs that only differ by their numeric suffix. Then we use the remaining specs to find values to show in the formal syntax.
For example, if we are looking for
font-size-adjust
, we find 2 entries in webref, "css-fonts" and "css-fonts-5". We discard "css-fonts-5" and just use "css-fonts" - that is, we consider "css-fonts" as the "current version" of the spec. This algorithm came out of the discussion mdn/yari#4656 (comment) and subsequent comments.In this case that means excluding the extra values that are added in level 5, namely
[ ex-height | cap-height | ch-width | ic-width | ic-height ]
.But BCD lists "css-fonts-5" as the current spec, meaning that if people look at the linked spec, there's a discrepancy.
What should we do here? It seems to me:
, but the discussion in feat(macros): rewrite CSSSyntax macro yari#4656 (comment) leads me to believe that CSSSyntax is right.A further issue here is that the "Values" section is also out of step with the others sometimes. This section is entirely manually maintained, and even the exact nature of what kind of thing it contains isn't always very clear. We could imagine a future in which the allowed set of items in "Values" is driven by webref as well, and we then have consistency across all these parts of the page.
Beta Was this translation helpful? Give feedback.
All reactions