-
Notifications
You must be signed in to change notification settings - Fork 49
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-masking] Specify how 'clip-path' should serialize for getComputedStyle #3
Comments
@jwatt So if I get your request right, serialization should always include the geometry box even though it was either not specified or falls back to a different default? |
My request is simply "please define the behavior". :) I was additionally noting that the behavior that would seem to be the desirable behavior is problematic for Mozilla, since our code isn't set up to have one part of value (the geometry box in this case) be present in the serialization depending on whether another part (the shape in this case) was specified or not. |
How is that problematic? It seems like that's a pattern we have a lot. |
@dbaron Let's take the Mozilla implementation details to https://bugzilla.mozilla.org/show_bug.cgi?id=1266316 |
@jwatt As far as I understood it is necessary to specify serialization of individual constructs like Beside that there is the computed value specified for each property. CSS Shapes' shape-outside uses a similar syntax as The syntax in question for clip-path is |
@jwatt per the last feedback from @dirkschulze , I think it's sufficient to know how serialization should be done in combination with [ Edited by @dbaron to escape markup that was being hidden. ] |
Closing this issue since there hasn't been any activity and response. Please reopen if this is not resolved. |
https://drafts.csswg.org/css-shapes-1/#basic-shape-serialization
specifies how basic shapes should be serialized. However, a
clip-path
value can also contain a<geometry-box>
and nothing seems to specify howclip-path
as a whole serializes.Since the text for basic shape serialization says something like "if part of the value is a default value and omitting it won't affect the result, omit it", it would seem on the surface to make sense to do that for
clip-path
as a whole too. That would seem to imply that if a shape and the default value for<geometry-box>
ofborder-box
is specified, the serialization would just be the shape. If however just a<geometry-box>
is specified its value would need to be serialized regardless of whether it is the default or not.That said, Mozilla's implementation would not make it very easy to skip serialization of the
<geometry-box>
since, at the point in the code where we serialize the enum, we don't have any information about whether the enum value is paired with a shape. @dbaronThe text was updated successfully, but these errors were encountered: