-
Notifications
You must be signed in to change notification settings - Fork 756
Description
I've been working on displaying the syntax of CSS features on MDN, via the webref package. We do this using a macro that uses fetches the syntax from webref, then tries to render it nicely, like: https://developer.mozilla.org/en-US/docs/Web/CSS/border#formal_syntax.
There are a few places where this isn't working: two that I have found are minmax() and fit-content(). These look like functions, and the MDN pages are tagged as functions, but in the specs they are not marked up as functions, so they don't appear in webref, and we're not able to show any syntax for them on MDN.
There's more on this here: mdn/content#18780 (comment) :
Finally <minmax()> doesn't seem to have an entry at all although it is listed as a component of some other types. Again, the same applies to some other functions, like <fit-content()>, where we don't see an error because our fit-content() page does not attempt to include formal syntax.
Both
minmax()andfit-content()look like CSS functions but they are not defined as CSS functions (the spec defines them with adata-dfn-type="value"and not adata-dfn-type="function"). They are rather defined as "simple" values asautoorinherit. If they were real CSS functions, the definition of<track-size>would not be:<track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( <length-percentage> )... but rather
<track-breadth> | <minmax()> | <fit-content()>Why is that? I don't know :) You may want to ask the CSS working group why they sometimes decide to create functions and sometimes decide to leave them as pure textual syntax. It may not be intentional.
So I wondered whether there's a reason that these features are not marked up as functions in the specs.