Skip to content

Switch component in Safari Mobile has ugly black box when disabled and checked #4771

@JGreenlee

Description

@JGreenlee

Current behaviour

I viewed https://snack.expo.dev/@react-native-paper/react-native-paper-example_v5 on Safari iOS 18

Image

Workaround

Unfortunately, there's no prop of Switch that will style the underlying <input> element, which is where the problem is, so the workaround is a global CSS rule:

input:is([type="checkbox"], [type="radio"]):checked:disabled {
  background-color: transparent;
}
Image

Your Environment

software version
ios 18.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions