Skip to content
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-inline-3] Define text-*-edge aliases in prose instead of with basic syntax? #8173

Closed
cdoublev opened this issue Dec 2, 2022 · 5 comments

Comments

@cdoublev
Copy link
Collaborator

cdoublev commented Dec 2, 2022

SVG text-*-edge aliases are defined with this basic syntax:

text-before-edge = text-top 
text-after-edge = text-bottom

I think there is no other keyword aliases defined like this, and there is no definition of what constitues a valid CSS production rule. Imo, the left hand side of a production rule should always be wrapped in <>. Some function productions are also defined without this nesting, but I came across recent commits that normalize them with it.

I would prefer to get these keyword aliases defined in prose instead of a production rule, if they cannot be defined in the value definition of vertical-align.

Obviously, this issue is very low priority.

@tabatkins
Copy link
Member

Yeah, tho we don't have a formal definition of our production rule syntax, this particular usage is certainly novel, and imo shouldn't be valid. This should be converted into equivalent prose, like we do for optimizeQuality and optimizeSpeed at the end of https://drafts.csswg.org/css-images-3/#the-image-rendering

@tabatkins tabatkins added the css-inline-3 Current Work label Dec 2, 2022
@cdoublev
Copy link
Collaborator Author

cdoublev commented Dec 3, 2022

If I understand correctly, it says that they are mapped whereas the current syntax suggests that they are aliases.

These are now deprecated; a user agent must accept them as valid values but must treat them as having the same behavior as crisp-edges and smooth respectively

If I am not mistaken, mapped values are preserved (for serialization) whereas aliases are replaced at parse time. I guess the difference is not important for implementers. Maybe CSS authors would prefer aliases, so they know they are using a legacy value.

But how various legacy rules/properties/functions are handled (aliased or mapped) is inconsistent and this creates confusion.

@fantasai
Copy link
Collaborator

That's not actually using class=prod, I don't think it's even trying to use valdef syntax? Just seems like weirdly marked up prose, and yes, probably should be fixed.

@fantasai
Copy link
Collaborator

@cdoublev Changed, lmk if this works for you.

@cdoublev
Copy link
Collaborator Author

Yes, thank you. You could have referenced legacy value alias though, like for overlay, distribute, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants