fix(painter): render double table borders as two rules (SD-3308)#3654
Closed
tupizz wants to merge 1 commit into
Closed
fix(painter): render double table borders as two rules (SD-3308)#3654tupizz wants to merge 1 commit into
tupizz wants to merge 1 commit into
Conversation
CSS `double` only renders two distinct rules when the border is at least 3px wide (1px rule + 1px gap + 1px rule). The painter emitted the authored width verbatim, so a typical w:val="double" w:sz="12" border (~2px) was collapsed by the browser into a single solid-looking line, while Word always renders two parallel rules for double borders. Clamp the rendered width up to 3px when the resolved CSS style is double, keeping authored widths that are already 3px or wider. Every border paint path funnels through applyBorder, so cell borders, outer table edges, and continuation rows are all covered by the one change. The prior unit test asserted the collapsed 2px output; the expectation flip to 3px is deliberate. Verified against the SD-3308 mutation fixture (double_or_dotted_borders.docx): the double table now shows two rules on every outer and interior edge, dotted and dashed render unchanged.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
Author
|
Superseded by #3658, which carries this commit unchanged alongside the SD-3035 style shading fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Word renders w:val="double" table borders as two parallel rules. SuperDoc emitted the authored width verbatim, and CSS double collapses to a single solid-looking line below 3px (1px rule + 1px gap + 1px rule), so a typical sz12 double border (~2px) rendered as one thin line.
The fix clamps the rendered width up to 3px when the resolved CSS style is double, without shrinking authored widths that are already 3px or wider. All border paint paths (cell borders, outer table edges, continuation rows) funnel through applyBorder, so the one change covers them all.
Linear: SD-3308
Verification
Notes
One step of the SD-3308 plan. Border precedence, nil/none suppression, inside gridlines, and cell-spacing borders were verified at Word parity against the SD-3308 fixture set and are untouched here.