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

mix-blend-mode causes all kinds of issues #8672

Closed
bpasero opened this issue Jul 2, 2016 · 9 comments
Closed

mix-blend-mode causes all kinds of issues #8672

bpasero opened this issue Jul 2, 2016 · 9 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded workbench-tabs VS Code editor tab issues
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Jul 2, 2016

Issues:

screen shot 2016-07-03 at 11 19 09

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug workbench-tabs VS Code editor tab issues labels Jul 2, 2016
@bpasero bpasero added this to the July 2016 milestone Jul 2, 2016
@bpasero bpasero self-assigned this Jul 2, 2016
@bpasero bpasero removed this from the July 2016 milestone Jul 3, 2016
@bpasero bpasero assigned bgashler1 and unassigned bpasero Jul 3, 2016
@bgashler1
Copy link
Contributor

bgashler1 commented Jul 5, 2016

I don't think this can be solved simply.

We probably need to do one of the following:

  • Use rgba colors (not a great long term solution, but I'm willing to do it)
  • Use a nasty and hacky z-index trick on duplicate versions of the tabs that act as the click/keyboard focus targets. They would have transparent backgrounds and would be opacity: 0 when not in focus or active. This would basically just be trick to get a colored overlay. (complicated and potentially buggy).
  • Use JavaScript internally to calculate the colors
  • Use a library that enables color-mod() function usage from the CSS 4 spec during runtime (Explore to introduce CSS variables from themes and use in workbench #8151).

Let me know what you think would be ideal from an engineering perspective.

@bpasero
Copy link
Member Author

bpasero commented Jul 5, 2016

Yeah, there is also the issue that once you set mix-blend-mode, all children seem to inherit this (similar to opacity) and you cannot unset this in a child. This is also the reason why I cannot have my nice blue drop feedback in light theme when dragging over tabs.

If we do something about it, it should not be a hack. Maybe we go back to rgba() in tabs land?

@bpasero bpasero added the important Issue identified as high-priority label Jul 6, 2016
@bpasero bpasero added this to the July 2016 milestone Jul 6, 2016
@bpasero
Copy link
Member Author

bpasero commented Jul 6, 2016

There are more issues with mix-blend: we lost LCD subpixel anti aliasing in the tabs control which will cause it to look blurry for some users.

Marking as important because I would not want to ship July without a fix for this (going back to opacity?).

@bpasero bpasero changed the title mix-blend-mode causes focus outline to show in grey instead of blue mix-blend-mode causes all kinds of issues Jul 6, 2016
@bgashler1
Copy link
Contributor

We agreed in the UX meeting today to remove the mix-blend-mode and instead use rgba colors to avoid issues with anti-aliasing and other color side-effects that we cannot otherwise work around.

@alexdima
Copy link
Member

👍 combined with the use of translate3d in rendering the cursors, it causes #9029

@bpasero
Copy link
Member Author

bpasero commented Jul 12, 2016

I pushed a change to remove mix-blend-mode from the tabs title. I did not introduce rgba() colors though and would like to wait for community feedback before reacting.

@bpasero bpasero closed this as completed Jul 12, 2016
@bpasero bpasero assigned bpasero and unassigned bgashler1 Jul 12, 2016
@jrieken jrieken added the verified Verification succeeded label Jul 28, 2016
@jrieken
Copy link
Member

jrieken commented Jul 28, 2016

@bpasero We still use mixed-blend-mode in the high contrast theme. Unsure about the effects that has?

@bpasero
Copy link
Member Author

bpasero commented Aug 5, 2016

@jrieken true, I saw that as well and it is probably very old. @bgashler1 do you have an idea why we have it?

@bgashler1
Copy link
Contributor

bgashler1 commented Aug 25, 2016

@jrieken @bpasero the mix-blend-mode: difference in the high-contrast theme is to enable highlighting selected text in white while inverting the light text color so it is visible.

screen shot 2016-08-25 at 12 10 03 pm

Without this technique, it would look like this.

screen shot 2016-08-25 at 12 02 04 pm

A long time ago, we used a grayish selection which was not high enough in contrast to be accessibility compliant.

Using this inverting technique hasn't caused any problems that I'm aware of and has been in the product for a long time. The alternative, which is currently not possible unless we add more logic, is to enable styling the text color of the selected text (beyond just allowing an overlay) and use black or very dark colors for all tokens when they're selected in the high-contrast theme.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority verified Verification succeeded workbench-tabs VS Code editor tab issues
Projects
None yet
Development

No branches or pull requests

4 participants