Skip to content

Instantly share code, notes, and snippets.

@cosmomathieu
Last active August 22, 2018 13:53
Show Gist options
  • Save cosmomathieu/398273a12fbe0a2b1566bb8df5391628 to your computer and use it in GitHub Desktop.
Save cosmomathieu/398273a12fbe0a2b1566bb8df5391628 to your computer and use it in GitHub Desktop.
Porting Bootstrap 3's btn-group-justified to Bootstrap 4 using scss (sass)
// Justified button groups - table
// ----------------------
.btn-group-justified {
display: table;
width: 100%;
table-layout: fixed;
border-collapse: separate;
.btn,
.btn-group {
float: none;
display: table-cell;
width: 1%;
.btn {
width: 100%;
}
.dropdown-menu {
left: auto;
}
}
}
// Justified button groups - flexbox
// ----------------------
.btn-group-justified {
display: flex;
width: 100%;
.btn,
.btn-group {
flex: 1;
.btn {
width: 100%;
}
.dropdown-menu {
left: auto;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment