Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to override '-webkit-appearance'

Tags:

css

I have the following CSS which is injected by JavaScript:

select {
    -webkit-appearance: none;
}

If I open up Chrome developer tools and uncheck those properties things look OK. How would I override this property in the CSS?

like image 391
David542 Avatar asked Oct 07 '14 22:10

David542


People also ask

What can I use instead of WebKit appearance?

Such as -webkit- is replaced by -ms- for Internet Explorer, -moz- for Firefox, -o- for Opera etc.

What does WebKit appearance mean?

The CSS -webkit-appearance property enables web authors to change the appearance of HTML elements to resemble native User Interface (UI) controls. The CSS -webkit-appearance property is a proprietary CSS extension that is supported by the WebKit browser engine.

What is CSS appearance None?

Use appearance-none to reset any browser specific styling on an element. This utility is often used when creating custom form components.


1 Answers

"The appearance property is used to display an element using a platform-native styling based on the users' operating system's theme."

Here are some options available:

  • button
  • button-bevel
  • caret
  • checkbox
  • default-button
  • listbox
  • listitem
  • media-fullscreen-button
  • media-mute-button
  • media-play-button
  • media-seek-back-button
  • media-seek-forward-button
  • media-slider
  • media-sliderthumb
  • menulist
  • menulist-button
  • menulist-text
  • menulist-textfield
  • none
  • push-button
  • radio
  • searchfield
  • searchfield-cancel-button
  • searchfield-decoration
  • searchfield-results-button
  • searchfield-results-decoration
  • slider-horizontal
  • slider-vertical
  • sliderthumb-horizontal
  • sliderthumb-vertical
  • square-button
  • textarea
  • textfield

For more look at mozilla:

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

or

http://www.w3schools.com/cssref/css3_pr_appearance.asp

This is a CSS3 protery so you should be aware of the comparability:

http://i.imgur.com/NajSN0O.png

like image 159
Maverick Avatar answered Sep 21 '22 23:09

Maverick