Skip to content Skip to sidebar Skip to footer

Chrome Default Button Style

Is it possbile to get the default Chrome button style in CSS? Of course many would say use http://pastebin.com/zjkW2cJe or http://pastebin.com/xKGBZFPg But i want this button CSS c

Solution 1:

If you want the pure CSS rules, you can inspect the button element and check out the entries saying "user agent 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 natively rendering a button, in order to render the same button in other browsers, I think that's impossible: A default button will be rendered by the Browser's UI or even the underlying operating system. In my Windows 7, the default button looks like this:

enter image description here

This style, as far as I know, is not in the CSS rules. You would have to rebuild it using background images, borders, rounded corners etc. If you don't mind using jQuery, libraries like jQuery UI have seducingly simple solutions for this.

Solution 2:

You want them... visually? If so, inspect the element and look at the computed styles.

Solution 3:

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

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

Post a Comment for "Chrome Default Button Style"