mdn / content

The content behind MDN Web Docs
https://developer.mozilla.org
Other
9.15k stars 22.46k forks source link

Missing items from CSS_Ref #903

Closed rachelandrew closed 3 years ago

rachelandrew commented 3 years ago

As raised in the sprints repo https://github.com/mdn/sprints/issues/2068 there are various missing properties in the CSS Reference at https://developer.mozilla.org/en-US/docs/Web/CSS/Reference

The pages for the missing properties exist on MDN.

I'm not sure how this is generated, but I can go fix the missing items if I'm pointed in the right direction.

sideshowbarker commented 3 years ago

As far as I can see from looking at the https://github.com/mdn/content/blob/main/files/en-us/web/css/reference/index.html source, the content of that article, none of it is generated; instead it’s added to manually.

rachelandrew commented 3 years ago

it's the property names in the index I'm talking about, sorry if that wasn't clear. They are generated by the macro {{CSS_Ref}}

sideshowbarker commented 3 years ago

it's the property names in the index I'm talking about, sorry if that wasn't clear.

Thanks, I see now — sorry for having been daft

From looking into the sources, here’s a short summary of how it seems to work:

So, taking user-select as an example, it’s in https://github.com/mdn/data/blob/e545c59014e0760af428145b5f56125423fa77f9/css/properties.json#L8976-L8991 — but per https://github.com/mdn/data/blame/e545c59014e0760af428145b5f56125423fa77f9/css/properties.json#L8989 and https://github.com/mdn/data/commit/65ef6ada8c5504389905b26c270ce8c2015835b7, was nonstandard until Nov 23rd.

So now it would show up in the index — after a new https://www.npmjs.com/package/mdn-data is released — but because the current downstream package is two months behind the changes to the https://github.com/mdn/data upstream source, it’s not showing up yet.

Taking a look at a couple others: aspect-ratio and appearance don’t show up because per https://github.com/mdn/data/blob/master/css/properties.json#L1948-L1963 and https://github.com/mdn/data/blob/master/css/properties.json#L1932-L1947, they’re both marked "status": "experimental". If they get marked standard, they’ll show up in the index.


https://github.com/mdn/yari/blob/56db834cc548d63dbd6fcd7132893ecb08db05b9/kumascript/macros/CSS_Ref.ejs#L11-L13 is what shows it only grabs "status": "standard" items.

rachelandrew commented 3 years ago

@sideshowbarker I think there is a case for including the experimental items in this list. Some of them have a lot of developer interest, and there aren't a huge number of them (I was involved in a project last year to figure out which we should remove the flag from). I feel that if there is enough reason for us to document them there is reason to expose them in the list.

Pinging @chrisdavidmills for his opinion on that.

sideshowbarker commented 3 years ago

I think there is a case for including the experimental items in this list… I feel that if there is enough reason for us to document them there is reason to expose them in the list.

100% agreed, for exactly that same line of thinking

Pinging @chrisdavidmills for his opinion on that.

I’ve also gone ahead and raised https://github.com/mdn/yari/pull/2338 with the change to the macro source that’d be needed to enable this. That allows testing it locally. So with that in place in my local environment, I’ll generate a diff for https://developer.mozilla.org/en-US/docs/Web/CSS/Reference output (in a few hours), so we can see exactly what all it would add that’s not included now.

chrisdavidmills commented 3 years ago

@sideshowbarker I think there is a case for including the experimental items in this list. Some of them have a lot of developer interest, and there aren't a huge number of them (I was involved in a project last year to figure out which we should remove the flag from). I feel that if there is enough reason for us to document them there is reason to expose them in the list.

Pinging @chrisdavidmills for his opinion on that.

Yes, agreed.

sideshowbarker commented 3 years ago

OK I tested the https://github.com/mdn/yari/pull/2338 fix and found that it doesn’t break anything, and adds the following 41 entries to the index:

--* align-tracks :any-link appearance aspect-ratio background-position-x background-position-y :blank block-overflow :defined :focus-visible :focus-within font-display (@font-face) ::grammar-error :has :host() :host-context() image-resolution inherits (@property) initial-letter initial-letter-align initial-value (@property) :is justify-tracks line-clamp line-height-step margin-trim masonry-auto-flow max-lines offset-position ::part :placeholder-shown code>@property</code ruby-align ruby-merge ruby-position ::spelling-error syntax (@property) text-decoration-skip text-size-adjust :where

rachelandrew commented 3 years ago

they all look perfectly sensible as things to include :)

escattone commented 3 years ago

Thanks @sideshowbarker @rachelandrew @chrisdavidmills! I just reviewed/merged @sideshowbarker's https://github.com/mdn/yari/pull/2338, which should take care of adding these CSS items with an experimental status. I'm also going to publish a new npm package for mdn-data, which should take care of things like the missing user-select (see https://github.com/mdn/sprints/issues/2068).

escattone commented 3 years ago

This is resolved.

Ryuno-Ki commented 3 years ago

OK I tested the mdn/yari#2338 fix and found that it doesn’t break anything, and adds the following 41 entries to the index:

Do we need an issue tracking the progress of documenting those?