Handle empty string and null for margin and padding subparts #165
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Per the linked issue in jsdom, the following bug exists, where
dom
is a JSDom instance:This PR fixes this bug by specifying that
null
andempty string
are valid values for subparts of the propertiesmargin
andpadding
. I've also added tests for the behavior of setting these properties toundefined
(value should remain as is).Verified that this behavior (using the repro above) matches the following browser's behavior:
Chrome 119.0.6045.123
Edge 120.0.2186.2
Firefox 120.0b8
Safari 17.1 (19616.2.9.11.7)
Fixes jsdom/jsdom#2504