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

White border around messenger's customer chat icon on dark mode after reload a website #52

Closed
belkocik opened this issue Jul 23, 2021 · 2 comments

Comments

@belkocik
Copy link

belkocik commented Jul 23, 2021

Hello, I got a dark mode from next/themes and on dark mode on my smartphone there is a white border of the messenger's icon (react-messenger-customer-chat). When I enter the website, change the theme to dark and then again enter the website there is white border around messenger's the icon and white bubble for the notifications. How to apply a color to this iframe and bubble for notifications? It doesn't look good ;/. I use tailwindcss and next.js.

image

I tried like this but dont work.:

@layer components {
  .cms-content > h1,
  h2 {
    @apply dark:text-gray-600;
  }
  .messenger-chat-bubble > iframe {
    @apply dark:bg-dark-posts;
  }
}

app.js

import "tailwindcss/tailwind.css";
import "../styles/globals.css";
import Footer from "../components/Footer";
import Header from "../components/Header";
import { getMDXComponent } from "mdx-bundler/client";
import MessengerCustomerChat from "react-messenger-customer-chat";

import { ThemeProvider } from "next-themes";

function MyApp({ Component, pageProps }) {
  return (
    <>
      <ThemeProvider attribute="class">
        <Header />
        <Component {...pageProps} />

        <Footer />
        {typeof window !== "undefiend" && (
          <MessengerCustomerChat
            pageId="1xxxxx"
            appId="xxx"
            className="messenger-chat-bubble"
          />
        )}
      </ThemeProvider>
    </>
  );
}
export default MyApp;

After entering the website, changing the theme to dark and reload the page
200619910_970589787109373_1985134886635526940_n

I tried this but didn't help

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer components {
  .cms-content > h1,
  h2 {
    @apply dark:text-gray-600;
  }
  .messenger-chat-bubble > iframe {
    @apply dark:bg-dark-posts;
  }
  .messenger-chat-bubble > .fb_customer_chat_icon {
    @apply dark:bg-dark-posts;
  }
}
@pacocoursey
Copy link
Owner

This looks more like a request for CSS help than an issue with next-themes, please seek advice elsewhere

@Pavelkovo
Copy link

@bubuq3
try to use enableColorScheme={false} in ThemeProvider

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

No branches or pull requests

3 participants