> On Jun 20, 2017, at 7:05 PM, Karl DeSaulniers <k...@designdrumm.com> wrote:
> 
> I chose to go with -*-appearance: unset; because I am able to turn it back on 
> say on an individual page.
> With !important, I have to override and override and override and can't just 
> simply remove the !important.
> Well, not that I have found. 
> 
> Is there a way to remove original !important statements from an element 
> without using !important?

1. Did you know that for input[submit] or [button] you can completely remove 
the native appearance by simply specifying a gradient-image as background - no 
need for -webkit-appearance:none; ? At least on iOS 8-9-10 not sure about 
Android blink based browsers. No need for !important.

[type="submit"] { background: linear-gradient(#ccc,#ccc); }

That doesn’t fully work for select radio-buttons or checkboxes unfortunately ( 
the gradient is there but there is still the native texture).

2. You _can_ override the !important by upping the specificity

E { property: value !important}
body E { property: other-value !important}

3. For form controls, I vastly prefer using the appearance property, as it 
clearly indicates what you are doing (intent: remove the native look-and-feel) 
and it avoids using !important. Using 'none' or 'unset' is up to you, the end 
result is the same, and * the computed value is the same in both cases *: 
*-appearance: none.

4. While reviewing some of my form-controls snippets yesterday, I noticed that 
Edge (at least v15, but probably older as well) fully recognises the 
-webkit-appearance property – and it works the same as with Safari / Blink.

5. On the subject of Edge (and IE 11):
- select widgets: https://msdn.microsoft.com/library/Hh771821
- radio / checkbox: https://msdn.microsoft.com/en-us/library/hh771816
- input[type=file]:
    https://msdn.microsoft.com/en-us/library/windows/apps/hh779844.aspx
    https://msdn.microsoft.com/en-us/library/windows/apps/hh465820.aspx

Have fun with those.


Philippe
--
Philippe Wittenbergh
https://l-c-n.com/






______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to