4

We like the native button style (reversal on press, outline, etc), but want to tweak the border style. However, when we tweak the border style (or any style), all the native styling is lost. How might a custom style be applied without losing all native styling? If that's not possible, can the entire native style be replicated in css, then tweaked?

<button>
Button
</button>

button {
  border: 1px solid green;
}
<button>
Button
</button>
Lance
  • 81
  • 5
  • Maybe look at this: http://stackoverflow.com/questions/15463854/pressed-button-css –  Dec 19 '15 at 07:05

1 Answers1

2

The initial button style is:

button {
  background:ButtonFace; 
  color:ButtonText; 
  border:2px outset ButtonFace;
}

You can then tweak it by changing the background color, border-radius etc. This page has some examples for borders: http://lifefeed.net/misc/test_borders.php

jianweichuah
  • 1,417
  • 1
  • 11
  • 22
  • 1
    This does not really work. I get "Windows 95" style buttons using this css, but when I use an invalid border value I get the default button style (e.g. Gtk Buttons) – allo Dec 17 '18 at 21:57