Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the equivalent of the Bootstrap 3 'btn-default' class in Bootstrap 4? [duplicate]

There was a nice button created by btn-default in Bootstrap 3.

<a class="btn btn-default">link</a>

Is there an equivalent in Bootstrap 4?

like image 293
George_kane Avatar asked Mar 17 '18 16:03

George_kane


1 Answers

The btn-outline-secondary class and btn-outline-light class in Bootstrap 4 are the 2 closest alternatives to what used to be btn-default in Bootstrap 3. (there's no exact equivalent in Bootstrap 4)

Here's a code snippet with live preview (notice the difference between a button and an a tag):

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

<div class="container m-3">
    <a class="btn btn-outline-secondary">outline-secondary link</a>
    <button type="button" class="btn btn-outline-secondary">outline-secondary 'button'</button>
    <br><br>
    <a class="btn btn-outline-light">outline-light link</a>
    <button type="button" class="btn btn-outline-light">outline-light 'button'</button>
</div>

Reference:

https://getbootstrap.com/docs/4.0/components/buttons/#outline-buttons

like image 180
WebDevBooster Avatar answered Oct 21 '22 05:10

WebDevBooster