Как во Vue переопределять стили Bootstrap?

Если применять этот код

<style lang="scss">
  .custom-btn {
    background: red;
  }
</style>

, то стили не применяются, если я прописываю этот класс в кнопке в template. Срабатывает только с !important, но это не вариант. Есть вариант как это переопределять?


Ответы (2 шт):

Автор решения: Bad_m

Попробуй так

<style lang="scss">
  ::v-deep .custom-btn {
    background: red;
  }
</style>
→ Ссылка
Автор решения: Viktor M

1.use the style attribute to add CSS inline on your divs

eg: ...

2.create your own style sheet and reference it after the existing stylesheet

then your style sheet should take precedence.

3.add a element in the of your HTML with the CSS you need,

this will take precedence over an external style sheet.

→ Ссылка