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

Fix: Add blend mode fallbacks if not supported #758

Merged
merged 4 commits into from
Apr 9, 2018
Merged

Fix: Add blend mode fallbacks if not supported #758

merged 4 commits into from
Apr 9, 2018

Conversation

jeremypress
Copy link
Contributor

This allows "legacy" highlight annotations to properly render in IE11, which by default does not support blend modes.

Current behavior:
screen shot 2018-04-03 at 3 45 49 pm

with fix:
screen shot 2018-04-03 at 3 44 15 pm

Is this reliable?
Normally, no. This workaround sets the opacity of the artifact in question to 0.5, whenever it encounters some kind of blending. If an opacity instruction for the given artifact appears after the blending instruction, the override will be replaced (this happens at an unknown frequency).

However, the code used to generate these annotations is written as follows:
screen shot 2018-04-03 at 3 42 54 pm

This means we know that our blend instruction will come after the opacity instruction, so this override will work. This will also make some other blending issues more viewable on IE11, but not all, due to the reason described above.

Tests on the way, wanted to get this out ASAP to see how everyone feels.

@boxcla
Copy link

boxcla commented Apr 3, 2018

Verified that @jeremypress has signed the CLA. Thanks for the pull request!

Copy link
Contributor

@JustinHoldstock JustinHoldstock left a comment

Choose a reason for hiding this comment

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

This looks great

@jeremypress jeremypress merged commit 95def3b into box:master Apr 9, 2018
@jeremypress jeremypress deleted the blend-modes branch April 9, 2018 23:00
jeremypress pushed a commit that referenced this pull request Apr 12, 2018
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.

4 participants