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

Normalize Safari iOS User Agent Styles to Match Chrome Defaults #4884

Open
istarkov opened this issue Feb 16, 2025 · 0 comments
Open

Normalize Safari iOS User Agent Styles to Match Chrome Defaults #4884

istarkov opened this issue Feb 16, 2025 · 0 comments
Labels
area:canvas Anything related to rendering on canvas area:publishing Anything related to publishing a site prio:1 The most important thing to work on type:feat Features and enhancements

Comments

@istarkov
Copy link
Member

Normalize Safari iOS User Agent Styles to Match Chrome Defaults

Description

On a regular basis, we encounter issues with iOS-rendered sites due to the WebKit user agent stylesheet, particularly the section related to button styles:

🔗 Relevant Code:
WebKit html.css Line 909-919

#if defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY

input[type="submit"], input[type="submit"]:active,
button[type="submit"], button[type="submit"]:active,
button[type="menu"], button[type="menu"]:active {
    background-color: -apple-system-blue;
    color: white;
    font-weight: bold;
}

#endif

This leads to inconsistencies in styling across browsers, as Safari iOS applies different button colors and font weights compared to other browsers like Chrome.

✅ Proposed Solution

To ensure a consistent cross-browser experience, we should normalize all cases where defined(WTF_PLATFORM_IOS_FAMILY) && WTF_PLATFORM_IOS_FAMILY is used by aligning them with Chrome's defaults.

@istarkov istarkov changed the title Title: Normalize Safari iOS User Agent Styles to Match Chrome Defaults Normalize Safari iOS User Agent Styles to Match Chrome Defaults Feb 16, 2025
@istarkov istarkov added area:canvas Anything related to rendering on canvas type:feat Features and enhancements prio:1 The most important thing to work on area:publishing Anything related to publishing a site labels Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:canvas Anything related to rendering on canvas area:publishing Anything related to publishing a site prio:1 The most important thing to work on type:feat Features and enhancements
Projects
None yet
Development

No branches or pull requests

1 participant