Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS: What does "input[type="search"]::-webkit-search-decoration" do?

Tags:

css

I wonder what the the part ::-webkit-search-decoration do in the CSS selector for input[type="search"]::-webkit-search-decoration?

And why is this causing en DOM Exception error?

function is(selector, element) {
        var div = document.createElement("div"),
        matchesSelector = div.webkitMatchesSelector;
        return typeof selector == "string" ? matchesSelector.call(element, selector) : selector === element;
 }
 is('input[type="search"]::-webkit-search-decoration', document.body);
like image 464
einstein Avatar asked Aug 24 '12 02:08

einstein


1 Answers

It allows you to make search boxes look uniform across multiple browsers. Chrome for instance has default styling for search boxes that does not fit into some designs.

here is a good link on the topic. http://geek.michaelgrace.org/2011/06/webkit-search-input-styling/

like image 168
David Avatar answered Sep 30 '22 13:09

David



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!