fix(reader): keep EPUB image blend out of dark themes#674
Merged
Conversation
Replace the custom image blend CSS override with the official Readium CSS v2 --USER__blendImages property. This keeps image blending on the Readium property path, clears the flag during theme changes, and prevents dark themes from inheriting the light-theme multiply blend.
Remove the leftover data-kmreader-theme injection from all EPUB web view CSS bridges now that image blending is driven entirely through Readium properties.
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.
Closes #673
Problem
Upgrading the EPUB reader to Readium CSS v2 introduced the official image blending path, and dark themes could still end up with multiply blending applied to images after theme changes.
Approach
Route image blending through Readium's
--USER__blendImagesproperty instead of a custom CSS override. The reader now enablesreadium-blend-ononly for the intended light themes, clears the property as part of the normal Readium property update cycle, and removes the now-unuseddata-kmreader-themebridge attribute.Scope
--USER__blendImagesto the tracked Readium property keysreadium-blend-ononly for light image-blend themesdata-kmreader-themeinjectionValidation
make build-macos