简体   繁体   中英

extending from bootstrap-vue scss

I'm trying to create a class that extends a bootstrap scss class:

@import '../../../node_modules/bootstrap/scss/bootstrap';
.settings-card {
  @extend .my-3;
  max-width: 30rem;
}

The extend is not complaining about not finding .my-3 (so I presume it is there, without the import it will complain).

This results in a class with only max-width being set.

The real setup is a little more complicated, since I'm using vue and bootstrap vue. This is exactly how it looks like, within a vue single component:

<style lang="scss" scoped>
@import '../../../node_modules/bootstrap/scss/bootstrap';

.settings-card {
  @extend .my-3;
  max-width: 30rem;
}
</style>

Please check

@use '../../../node_modules/bootstrap/scss/bootstrap';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM