Skip to content

Option to set prefix config for tailwind in order to allow side-by-side use with bootstrap #4164

Closed Answered by simontaurus
simontaurus asked this question in Q&A
Discussion options

You must be logged in to vote

Update: Apparently it is easier to scope bootstrap.css within the component definition:

Option 1:

<style lang="scss" scoped>
@import url('https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css');
</style>

Option 2:

<template>
  <div class="bootstrap-wrapper"></div>
</template>
<style lang="less">
.bootstrap-wrapper {
  @import (less) url('https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css');
}
</style>

However, it seems like imports in vue style section are not working at all (see #4177).
Option 2 also fails to due lacking support of import variants in lesscpy, see lesscpy/lesscpy#71

Compiling the vue component with vite and manually including the gen…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by simontaurus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant