B
B
Black_Fire2021-07-26 23:06:59
Bootstrap
Black_Fire, 2021-07-26 23:06:59

How to override Bootstrap 5 styles in Vue 3?

If you apply this code

<style lang="scss">
  .custom-btn {
    background: red;
  }
</style>
,
then the styles are not applied if I write this class in the button in template. Only works with !important, but that's not an option. Is there a way to override this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2021-07-26
@Black_Fire

Well, you can disable !important inside bootstrap. See $enable-important-utilities .
If you need an example: here is how to connect and override parameters in one of my projects

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question