0

i am using tally forms in my next js app and it works great on light mode, i made modifications in it to work for dark mode aswell but the issue is that on ios, it defaults to dark mode css if the system has dark mode enabled even if the website is being shown in light mode. This is the css:

:root {
   color-scheme:light dark;
}
@media (prefers-color-scheme: dark) {
   .tally-app{
      color:white;
   }
}

i tried almost all possible methods but failed to change the text color of iframe's inner content to white

2
  • So .tally-app is supposed to refer to the iframe element? And this is your main document's stylesheet? That can't work, styling doesn't apply across document boundaries. This styling would need to be applied inside the document, that got loaded into the iframe. If the iframe is same-origin, then you could insert styling via JavaScript, after the document has loaded. Commented Dec 16, 2024 at 11:35
  • .tally-app is a wrapper element inside the iframe and i know that css would not work as iframe is from a different origin. My main concern is that prefers-color-scheme:dark on ios reads OS level color scheme rather than browser level Commented Dec 16, 2024 at 12:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.