Skip to content

[css-conditional-5] Remove definitions of <font-format> and <font-tech> #8110

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

Closed
cdoublev opened this issue Nov 21, 2022 · 4 comments · Fixed by #8111
Closed

[css-conditional-5] Remove definitions of <font-format> and <font-tech> #8110

cdoublev opened this issue Nov 21, 2022 · 4 comments · Fixed by #8111
Assignees
Labels
css-conditional-5 Current Work

Comments

@cdoublev
Copy link
Collaborator

cdoublev commented Nov 21, 2022

Would it be possible to remove the definitions of <font-format> and <font-tech> from CSS Conditional 5?

The spec says:

This level of the specification extends the <supports-feature> syntax

But it does not extend these subproductions. Worse: <font-format> is only a subset of what is defined in CSS Fonts.

These duplicate definitions must be specifically handled in w3c/webref, by defining an "authoritative source" for the production, which is not great.

@drott
Copy link
Collaborator

drott commented Nov 29, 2022

Worse: is only a subset of what is defined in CSS Fonts.

Are you referring to the <string> production? This is the legacy part of format() which is intentionally not included in the conditionals definition.

Regarding the PR: What does the spec look like after bikeshed processing - do the font-tech and font-format become clickable references to fonts-4? font-format would then no longer be correctly defined.

@cdoublev
Copy link
Collaborator Author

Are you referring to the <string> production?

Yes. Should it be invalid in @supports but valid in src for @font-face?

If so, I will close my PR but I think it should be defined in prose (more simple) or in the syntax. I think rewriting the syntax would require to not define font-tech() as a type (<font-tech()> = ...) but as a context-sensitive function (font-tech() = ...).

I did not check the result in Bikeshed, which reports an error for duplicate type refs of <font-tech> in CSS Conditional 5 and CSS Fonts 5, and generates a link to CSS Fonts 5 for <font-format>. I do not know well how it works in details and I do not really understand why it generates a link to CSS Fonts 5 for <font-format> but not <font-tech>.

@cdoublev
Copy link
Collaborator Author

I updated the PR to import <font-format> and <font-tech> from CSS Fonts by defining that "a CSS processor is considered to support a font format when it is capable of utilising the specified font format in layout and rendering, and this format is not specified as a <string>", which is similar to the prose excluding an unknown -webkit pseudo-element for a supported selector.

@vitorroriz
Copy link

At https://www.w3.org/TR/css-conditional-5/#at-supports-ext, It is confusing for me to read:

Note: The allowed values for the font-format() function are the same as those for the format() function in the '@font-face' src descriptor.

Given that at @font-face src we accept <string> for legacy reasons.

@svgeesus svgeesus self-assigned this May 8, 2023
@svgeesus svgeesus added the css-conditional-5 Current Work label May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-conditional-5 Current Work
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants