Shopify / Shopify/dawn

[Bug] `<shopify-account>` crashes WebKit on iOS 16 (EXC_BAD_ACCESS in RenderThemeIOS::systemColor due to Relative Color Syntax)

Open
#3,982 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Liquid
Stars
3.1k
Forks
4.5k
PR merge metrics
No merged PRs in 30d

Description

Description:
On iOS/iPadOS 16.x devices, loading a storefront with <shopify-account> enabled causes an immediate WebContent process crash (EXC_BAD_ACCESS / SIGSEGV at 0x8).

Root Cause:
The Shadow DOM styles injected by <shopify-account> include CSS Relative Color Syntax with var() references on pseudo-elements:

.account-button__avatar::before {
  box-shadow: 0 4px 4px rgba(from var(--shopify-account-signed-in-avatar-color-background) r g b / .12);
}

On iOS 16 WebKit engines, evaluating dynamic CSS variables inside relative color expressions on pseudo-elements dereferences a null pointer in WebCore::RenderThemeIOS::systemColor.

Stack Trace from .ips Crash Log:

  • WebCore::RenderThemeIOS::systemColor
  • WebCore::CSSPropertyParserHelpers::consumeOriginColorRaw
  • WebCore::CSSPropertyParserHelpers::parseRelativeRGBParametersRaw
  • WebCore::Style::Builder::resolveVariableReferences
  • WebCore::Style::TreeResolver::resolvePseudoElement

Suggested Fix for Shopify CDN:
Wrap relative color syntax inside @supports (color: rgb(from white r g b)) feature queries with solid RGBA fallbacks, or avoid relative color syntax on pseudo-elements in customer account web components.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by locating the Shadow DOM CSS for and reproduce the crash on an iOS 16 device or WebKit environment. Done means the affected styles provide compatible fallbacks or feature-query handling and the WebContent crash no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, ios
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.