question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[JavaScript][Mac] Chrome on Mac magically apply gradient white background on button when we say solid white

See original GitHub issue

Platform

  • JavaScript

Author or host

Host. We are Web Chat 🌐💬.

Version of SDK

Web Chat 4.5.2 uses Adaptive Cards 1.2.0.

Details

Related to https://github.com/microsoft/BotFramework-WebChat/issues/2365.

In Chrome on Mac (yap, very specific). We observed that all buttons on the Adaptive Card have gradient background color.

We checked it was styled properly with background-color set to White. I think this is a very specific problem to Chrome.

image

If you set the background-color to #FEFEFE, it become solid off-white. But if you set it to #FFF, it become gradient. And if you set border-style to dashed, it is solid white again. But if you set border-style to solid, it become gradient again. 🙄

So, I believe Adaptive Cards need to set appearance: none to prevent Chrome on Mac to style it.

image

To try this out real quick, please do the following:

  1. On a Mac with Chrome 76 (it repro on 72 before we upgraded to 76)
  2. Navigate to https://compulim.github.io/webchat-loader
  3. On the “Secret” field, click on “MockBot” below
  4. Click “Open Web Chat in a new window”
  5. After Web Chat is loaded, type card breakfast, help, or herocard

Then, play with the <kbd>F12</kbd> and try fiddling background-color and border-style. 😉

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dclauxcommented, Aug 30, 2019

Eventually we’ll get the AC CSS stylesheet properly documented, but I can’t promise when.

0reactions
jonmillcommented, Nov 11, 2021

Closing this issue as a workaround has been identified and our css styles have been documented

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adaptive Card buttons are wonky on Mac Chrome #2365
Type help; Note that the buttons have a gradient background. Expected behavior. Adaptive Card buttons should show as plain white. Additional ...
Read more >
How do I make a button that turns my background into ...
/*I want this to be a gradient, but I cant figure out how*/ function myFunction(){ document.body.style.background= "linear-gradient(90deg, ...
Read more >
CSS Gradients
Gradients are background-image ... While declaring the a solid color uses background-color property in CSS, gradients use background-image . This ...
Read more >
Gradient Text
I am using this on a modal and when I -webkit-text-fill-color: transparent; then my black background disappears… Debayan Ganguly. Permalink to ...
Read more >
The importance of focus indicators
In the light theme to this site we tend to use 2 different background colours, we use a shade of white (#FDFDFD) and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found