If you were using scss, you could simply add another entry to the $spacers variable before compiling bootstrap... so something like
$spacers: (
0: 0,
1: ($spacer * .25),
2: ($spacer * .5),
3: $spacer,
4: ($spacer * 1.5),
5: ($spacer * 3),
6: ($spacer * 5)
)
The above taken and modified from https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss#L100
Since it sounds like you're using CSS only, you could define your own following the pattern they do, so in your own CSS add a set of classes (see below, taken and modified from https://github.com/twbs/bootstrap/blob/v4-dev/dist/css/bootstrap.css#L6937):
.pt-6,
.py-6 {
padding-top: 5rem !important;
}
.pr-6,
.px-6 {
padding-right: 5rem !important;
}
.pb-6,
.py-6 {
padding-bottom: 5rem !important;
}
.pl-6,
.px-6 {
padding-left: 5rem !important;
}
and if you in particular want the medium breakpoint ones, you could do
@media (min-width: 768px) {
.pt-md-6,
.py-md-6 {
padding-top: 5rem !important;
}
.pr-md-6,
.px-md-6 {
padding-right: 5rem !important;
}
.pb-md-6,
.py-md-6 {
padding-bottom: 5rem !important;
}
.pl-md-6,
.px-md-6 {
padding-left: 5rem !important;
}
}
p-5 m-5
). would this be compatible with other styled applied(bg, border, ...)? – Crinoid