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

feat: support border-spacing #294

Merged
merged 2 commits into from
Sep 18, 2022

Conversation

yisibl
Copy link
Contributor

@yisibl yisibl commented Sep 17, 2022

border-spacing = <length> <length>?

Spec: https://www.w3.org/TR/CSS22/tables.html#propdef-border-spacing

@@ -805,6 +805,8 @@ define_properties! {
"inset-inline": InsetInline(InsetInline) shorthand: true,
"inset": Inset(Inset) shorthand: true,

"border-spacing": BorderSpacing(BorderSpacing),
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂😂 Done

// 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>?`
Copy link
Contributor Author

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?

Copy link
Member

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.

@devongovett devongovett merged commit 2434365 into parcel-bundler:master Sep 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants