-
Notifications
You must be signed in to change notification settings - Fork 661
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-grid] Mark up minmax() and fit-content() as functions in the spec? #7682
Comments
You might be interested by #7380 and #2921 (comment).
|
Right, the functions should still be marked as functions rather than values, but their context-sensitivity (indicated by the presence of the |
To be clear, taking the current markup.
The first two functions have context-sensitive definitions, are marked with The third has a unique definition, is marked with EDIT: |
Okay, I went ahead and marked up minmax() and fit-content() as functions (and also fixed fit-content() in Sizing, where it had the same issue). As I said, the context-sensitivity is indicated by the functions have a |
Please tell me if I should open new issue(s) and/or PR(s). If I am not mistaken, all functions below are defined TLDR: I suspect that you think most of them should rather be context-free. In Filter Effects 1, filter functions ( In CSS Transforms 1-2, transform functions ( In CSS Shapes 1, shape functions ( Among shape functions, the definition of In CSS Values 5, In CSS Easing 1-2:
In CSS Content 3, In CSS Overflow 4, In CSS Page Floats 3, In CSS Images 4, As a grammar-driven parser implementer, I have to manually define a context-sensitive function definition when it does not appear in the value definition of its context: const types = {
// ...
'<basic-shape>': 'circle(<shape-radius>? [at <position>]?) | ellipse([<shape-radius>{2}]? [at <position>]?) | etc',
'<transform-function>': 'matrix(<number>#{6}) | translate(<length-percentage> , <length-percentage>?) | etc',
'<cubic-bezier-easing-function>': 'cubic-bezier(<number [0,1]>, <number>, <number [0,1]>, <number>)',
'<step-easing-function>': 'steps(<integer>, <step-position>?)',
// ...
} |
Do you think |
There is also a few types defined as |
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()
andfit-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) :
So I wondered whether there's a reason that these features are not marked up as functions in the specs.
The text was updated successfully, but these errors were encountered: