Customize with CSS variables
Change colors without Sass.
Bootstrap · Customize with CSS variablesIntermediate
<style>
:root {
--bs-primary: #7c3aed;
--bs-primary-rgb: 124, 58, 237;
--bs-link-color-rgb: 124, 58, 237;
--bs-border-radius: 0.75rem;
}
.btn-primary {
--bs-btn-bg: #7c3aed;
--bs-btn-border-color: #7c3aed;
--bs-btn-hover-bg: #6d28d9;
--bs-btn-hover-border-color: #6d28d9;
--bs-btn-active-bg: #5b21b6;
}
</style>
<button type="button" class="btn btn-primary">Purple button</button>css variables--bs-primarythemeoverride