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

WebView Crash on Safari 16.4/16.5 when using ::placeholder #3164

Open
1 of 3 tasks
deka0106 opened this issue Mar 4, 2025 · 0 comments
Open
1 of 3 tasks

WebView Crash on Safari 16.4/16.5 when using ::placeholder #3164

deka0106 opened this issue Mar 4, 2025 · 0 comments

Comments

@deka0106
Copy link

deka0106 commented Mar 4, 2025

Description

On Safari 16.4 and 16.5, displaying a page that uses ::placeholder causes the WebView to crash.
This issue is triggered by Panda CSS's reset CSS, which uses color-mix(in srgb, currentColor, transparent).

Link to Reproduction

https://play.panda-css.com/OP_wI8H1lF

Steps to reproduce

  1. Open the target page using Safari 16.4 or 16.5

JS Framework

No response

Panda CSS Version

0.53.0

Browser

Safari 16.4, 16.5

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

On Safari 16.4 and 16.5, a crash occurs in WebView when a page utilizing the ::placeholder selector is displayed.
It has been reported that using currentColor within the CSS color-mix() function on Safari 16.4/16.5 triggers this crash.

The issue originates from the reset CSS, where the ::placeholder style internally uses color-mix(in srgb, currentColor, transparent).

'::placeholder': {
opacity: 1,
'--placeholder-fallback': 'color-mix(in srgb, currentColor 50%, transparent)',
color: 'var(--global-color-placeholder, var(--placeholder-fallback))',
},

As a workaround, define a custom ::placeholder style as follows:

export default defineConfig({
  preflight: true,
  globalCss: {
    "::placeholder": {
      color: "currentColor",
      opacity: "0.5",
    },
  },
  // ...
})
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

1 participant