-
Notifications
You must be signed in to change notification settings - Fork 140
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-typed-om-1] Duplicating a CSSVariableReferenceValue is harder than it probably should be #665
Comments
Do we need similar clone methods for other subclasses for consistency? |
I don't know. Do you expect people to clone these things? This one just jumped out at me because extracting information from a CSSVariableReferenceValue that can be used to construct another CSSVariableReferenceValue was nontrivial. |
Yeah |
For now, I at least fixed it so that the fallback argument was nullable, so you can just spam the two fields into the constructor and get something equivalent. Adding constructors for everything that take an existing instance and duplicate it is probably something good to do as well, but I'll defer it for now. |
Why not make null the default value too, then, to make the algorithm simpler? |
Yeah, makes sense. |
Say I have a https://drafts.css-houdini.org/css-typed-om-1/#cssvariablereferencevalue and I want to create a "copy" of it. How do I do that?
throws.
throws if I have no fallback.
works, but who would think of doing that? ;)
Ideally there would be a constructor taking CSSVariableReferenceValue.
In addition to that, the second (optional) ctor arg should perhaps be nullable and default to null....
The text was updated successfully, but these errors were encountered: