-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Added alias table for deprecated css properties #552
base: main
Are you sure you want to change the base?
Conversation
sort.Slice(webrefData.Properties, func(i, j int) bool { | ||
return webrefData.Properties[i].Name < webrefData.Properties[j].Name | ||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we want to sort the properties alphabetically, it might make more sense to sort them after its spec.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do you mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you are looking for a specific prop, and it's syntax, the computed props might be nearer then, since they are all defined in the same spec.
I guess for expanded props it isn't really an issue, since of grid
or mask
, they all also start with grid-
or mask
.
|
||
for wdp := range webrefData.Properties { | ||
if webrefData.Properties[wdp].Name == alias { | ||
property.Syntax = webrefData.Properties[wdp].Syntax |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't straight up copy the syntax, I think it makes sense to also add a property that it is an alias and which prop it aliases. So we can copy the value in the matching part directly to the aliased prop.
So when we have -webkit-mask
, we copy the property to mask
in the matcher. Basically at the same point where we resolve shorthands.
This makes it easier in the mask implementation, since we only need to check for mask-clip
and not also -webkit-mask-clip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that might make sense
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'll move the aliases to a separate "alias" listing, and pick them up in the matcher
Fixes #551