-
Notifications
You must be signed in to change notification settings - Fork 167
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
feat: support border-spacing #294
Conversation
src/properties/mod.rs
Outdated
@@ -805,6 +805,8 @@ define_properties! { | |||
"inset-inline": InsetInline(InsetInline) shorthand: true, | |||
"inset": Inset(Inset) shorthand: true, | |||
|
|||
"border-spacing": BorderSpacing(BorderSpacing), |
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 think this could just be Size2D<Length>
rather than needing a custom BorderSpacing
type. Size2D
already handles the parsing and omitting of the second value if it is equal to the first.
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.
😂😂 Done
488c119
to
7c1a3e4
Compare
// we may need to implement NonNegativeLength like Servo does. | ||
// Servo Code: https://github.com/servo/servo/blob/08bc2d53579c9ab85415d4363888881b91df073b/components/style/values/specified/length.rs#L875 | ||
// CSSWG issue: https://lists.w3.org/Archives/Public/www-style/2008Sep/0161.html | ||
// `border-spacing = <length> <length>?` |
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.
@devongovett Do we need to implement NonNegativeLength
?
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.
Eventually maybe. Right now it wouldn't have any effect on the output because we fall back to passing through the original value when an error occurs.
border-spacing = <length> <length>?
Spec: https://www.w3.org/TR/CSS22/tables.html#propdef-border-spacing