Chrome default button style

Is it possible to get the default Chrome button style in CSS?

Of course, many would say: http://pastebin.com/zjkW2cJe or http://pastebin.com/xKGBZFPg

But I want this button CSS code ...

+2


source to share


3 answers


If you want pure CSS rules, you can check the button element and check the entries containing the "user stylesheet".

In my Chrome 9 they look like this:

input, textarea, keygen, select, button, isindex, datagrid {
margin: 0em;
font: -webkit-small-control;
color: initial;
letter-spacing: normal;
word-spacing: normal;
....... etc. much more

      



however, if you literally want the rules for the visual display of a button to render the same button in other browsers, I think this is not possible: the default button will be rendered by the browser UI or even the underlying operating system. On my Windows 7, the default button looks like this:

enter image description here

This style, as far as I know, does not follow the CSS rules. You will have to rearrange it with background images, borders, rounded corners, etc. If you don't mind using jQuery, libraries like jQuery UI have temptingly simple solutions for this.

+3


source


Do you want them ... visually? If so, check the element and look at the computed styles.



+1


source


In current Chrome on macOS, it goes something like this:

background-image: linear-gradient(to bottom, #e4e4e4, #f7f7f7);
border: 1px solid #afafaf

      

0


source







All Articles