Stop Safari Mobile from giving input buttons rounded corners
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.
Introduction
Mobile Safari applies platform-specific control styling to form elements, and one visible effect is rounded corners on buttons and button-like inputs. If your design needs square corners or a fully custom button style, you usually have to override the browser's native appearance first, then set your own border radius explicitly.
Why Safari Does This
On iOS, Safari tries to make form controls look like native touch-friendly controls. That means input elements such as these may receive browser chrome you did not ask for:
- '
input[type="button"]' - '
input[type="submit"]' - '
input[type="reset"]' - '
button'
A plain border-radius: 0 is sometimes not enough because the browser's platform appearance may still be active.
The Core CSS Reset
The usual fix is to remove the default appearance and then define your own shape.
This does two important things:
- '
-webkit-appearance: nonedisables the default iOS control styling' - '
border-radius: 0explicitly sets square corners'
If you stop at border-radius: 0 only, Safari may still draw the control using its default appearance rules.
A More Complete Button Style
Once native appearance is removed, you often need to restyle the button more fully because the browser is no longer helping with platform defaults.
This gives you a predictable starting point across browsers instead of mixing your design with leftover platform styling.
Example HTML
With the CSS reset in place, both controls should follow your custom square-corner styling much more consistently.
Test Real Inputs, Not Just Desktop Emulation
Desktop browser emulation helps, but iOS Safari behavior is ultimately best verified on a real device or a faithful simulator. Form controls are one of the places where mobile browsers can diverge from desktop expectations in subtle ways.
If the corners still look rounded, check for:
- another stylesheet reapplying
border-radius - component-library styles loaded later in the cascade
- a box shadow or outline creating the illusion of rounding
- a missing
appearance: nonerule on the actual control selector
Accessibility Still Matters
When you remove native appearance, you take more responsibility for usability. Make sure the custom button still has:
- clear contrast
- visible pressed or focused states
- adequate padding for touch targets
- legible typography
A fully flattened button that looks perfect in screenshots but loses focus visibility is a regression, not an improvement.
When To Leave The Native Style Alone
Not every design needs to fight the browser here. If your app already follows Apple's look reasonably closely, the native rounded style may actually be the best UX choice. Override it only when design consistency truly matters across your component system.
The right question is not "how do I remove Safari's style" but "should this control be custom-styled at all."
Common Pitfalls
- Setting
border-radius: 0without also removing the native WebKit appearance. - Styling only
buttonbut forgettinginput[type="submit"]and similar controls. - Removing native appearance and forgetting to restyle borders, padding, and focus states.
- Debugging in desktop Safari only and assuming iOS Safari will behave identically.
- Mistaking a shadow, outline, or parent clip effect for actual rounded button corners.
Summary
- Mobile Safari often applies native rounded styling to buttons and button-like inputs.
- The key reset is
-webkit-appearance: noneplus an explicitborder-radius. - After removing native appearance, restyle the button fully so it still looks intentional and usable.
- Test on a real iOS device or simulator for final verification.
- Keep accessibility in mind when replacing the platform's default control styling.
Related reading
- Storing passwords with Node.js and MongoDB
- Stretch and scale a CSS image in the background - with CSS only
- String Concatenation using '' operator
- String interpolation in JavaScript?
- Strip all non-numeric characters from string in JavaScript
- Strip HTML from strings in Python
- Strip HTML tags from text using plain JavaScript
- Stripping out HTML tags from a string
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
Interview Questions practice on Codemia
Over 8,000 real interview questions from top companies, searchable by company and role.