"Bootstrap Outline Buttons"
Bootstrap 3.0.3 Snippet by StartBootstrap

<div class="container"> <div class="row"> <br> <h2>Outline Buttons</h2> <p>Add the class <code>.btn-outline</code> to any Bootstrap button style.</p> <a class="btn btn-primary btn-outline">Primary Button</a> <a class="btn btn-success btn-outline">Success Button</a> <a class="btn btn-warning btn-outline">Warning Button</a> <a class="btn btn-danger btn-outline">Danger Button</a> <a class="btn btn-default btn-outline">Default Button</a> <br> <br> <h3>Button Sizes</h3> <a class="btn btn-primary btn-outline btn-lg">Large Button</a> <a class="btn btn-success btn-outline btn-sm">Small Button</a> <a class="btn btn-danger btn-outline btn-xs">Extra Small Button</a> </ul> </div> </div>
.btn-outline { background-color: transparent; color: inherit; transition: all .5s; } .btn-primary.btn-outline { color: #428bca; } .btn-success.btn-outline { color: #5cb85c; } .btn-info.btn-outline { color: #5bc0de; } .btn-warning.btn-outline { color: #f0ad4e; } .btn-danger.btn-outline { color: #d9534f; } .btn-primary.btn-outline:hover, .btn-success.btn-outline:hover, .btn-info.btn-outline:hover, .btn-warning.btn-outline:hover, .btn-danger.btn-outline:hover { color: #fff; }

Questions / Comments:

how to add class?

mark (0) - 1 year ago - Reply 0


tiptop

bobby (0) - 2 years ago - Reply 0


Love it. Thanks!

Kyle Zeller (0) - 2 years ago - Reply 0


I try to use this style in Joomla 3.3 protostar template (bootstrap included). Primary button is always colored.
So I must add this css code:
.btn-primary.btn-outline {color: #428bca; background: none;}
.btn-primary.btn-outline:hover {background: #428bca;}

schel4ok (0) - 3 years ago - Reply 0


Took the Less version from Phureewat Aphibansri and converted it to Sass.

mindctrl (0) - 3 years ago - Reply 0


Add this below code to your button.less (Working with BS 3.3.0)

.btn.btn-outline {
background-color: transparent;
.transition(all .5s);

&.btn-default {
color: @btn-default-color;
&:hover, &:active {
background-color : @btn-default-color;
color: white;
}
}

&.btn-primary {
color: @btn-primary-bg;
&:hover, &:active {
background-color : @btn-primary-bg;
color: white;
}
}

&.btn-success {
color: @btn-success-bg;
&:hover, &:active {
background-color : @btn-success-bg;
color: white;
}
}

&.btn-info {
color: @btn-info-bg;
&:hover, &:active {
background-color : @btn-info-bg;
color: white;
}
}

&.btn-warning {
color: @btn-warning-bg;
&:hover, &:active {
background-color : @btn-warning-bg;
color: white;
}
}

&.btn-danger {
color: @btn-danger-bg;
&:hover {
background-color : @btn-danger-bg;
color: white;
}
}
}

Phureewat Aphibansri (0) - 3 years ago - Reply 0


This style doesn't exist at all in the regular bootstrap build. Is this an extension to Bootstrap? Where can I get a such?

alex forselius (0) - 3 years ago - Reply 0


Last style must expanded for :active state for all buttons

.btn-primary.btn-outline:hover,
.btn-primary.btn-outline:active,
.btn-success.btn-outline:hover,
.btn-success.btn-outline:active,
.btn-info.btn-outline:hover,
.btn-info.btn-outline:active,
.btn-warning.btn-outline:hover,
.btn-warning.btn-outline:active,
.btn-danger.btn-outline:hover,
.btn-danger.btn-outline:active {
color: #fff;
}

Modex (0) - 3 years ago - Reply 0


Neat! Thanks!

Umran Hussein (0) - 4 years ago - Reply 0


Related: See More