Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove textarea inner shadow on Mobile Safari (iPhone)

By adding this css style:

  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;

As per https://developer.mozilla.org/en-US/docs/Web/CSS/appearance


While adding the CSS style

-webkit-appearance: none;

will work, it gets rid of everything. You may want to try this instead:

box-shadow: none !important;

This way you keep the down-arrow.


Here is the easy solution

input[type=text] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

Sometimes you can have a stylesheet there broke the appearance: none; so a way to fix it when that happens is to use caret. The best way will be to rewrite your code and find out what's part of your code there mess up the style for none

Before using caret you need to know that it can get you some trouble with other styles

-webkit-appearance: caret;
   -moz-appearance: caret;
     -o-appearance: caret;
        appearance: caret;

NOTE: Use none, caret is not the optimal.