Repository navigation
fix(export): retain RGBA alpha with presentation opacity - #321
Open
rudycelekli wants to merge 2 commits into
Open
rudycelekli wants to merge 2 commits into
rudycelekli wants to merge 2 commits into
Conversation
Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com>
|
Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com>
This branch has not been deployed
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.
What does this PR do?
Combine RGBA color alpha with an existing numeric presentation opacity exactly once. Preserve RGBA when CSS or other-element opacity could affect the unresolved cascade, keeping appearance without claiming strict-consumer compatibility in that fallback.
Updates the packaged helper, existing regression verifier/test, affected import/export reference and README together. No manifest version, IR field or diagram type change.
Visual proof
A direct half-alpha/half-opacity red shape exports as alpha64, matching its source. Actual CSS, inline and inherited opacity controls also retain source alpha64 through conservative RGBA preservation; before that fallback they incorrectly exported alpha128.
The proof uses owned neutral source or unchanged shipped assets and actual native producer/browser callers. No diagram, example or template variant is edited; no application integration beyond the named producer/browser is claimed.
Validation gates
.maintainer-policy.jsonpassed on the exact signed head.python3 scripts/test-export-svg-standalone.pypassed, including the new regression and existing controls; the regression fails against the original production implementation.Tested head:
9d02c195530360c716c564fdde2eefdda67f227f. Local validation uses macOS, Python 3.12.14, Playwright 1.62.0, Chromium 151.0.7922.34 and Pillow 12.1.1. Hosted matrix checks remain pending. Generated icon outputs passed the existing EOL-insensitive gate, then were restored to their index line endings.Checklist
Related issues
Closes #288.
Codex assisted with investigation, implementation and verification on behalf of @rudycelekli. Companion fixes address separate reproduced failures but share helper/verifier/reference sections and may require integration. Existing #282/#284 parsing work, #249 font prose and #66 broad role prose are separate scopes.
Review regressions cover parent fill/stroke inherited independently from child paint, encoded inline declarations and escaped CSS property names. Seven actual source/export browser controls match on the current signed head. This converter does not claim to resolve the full CSS cascade or guarantee strict SVG 1.1 import for unresolved RGBA.