-
We have both Bootstrap and Tailwind in our app while migrating to Tailwind. Is there any way to achieve this? If not via the config, is there a (feasible) way to overwrite/modify the core Display plugin (https://github.com/tailwindlabs/tailwindcss/blob/master/src/plugins/display.js) and use a custom version instead? |
Beta Was this translation helpful? Give feedback.
Answered by
tordans
Feb 18, 2021
Replies: 1 comment 1 reply
-
What we ended up doing: Part 1: in our tailwind.config.js corePlugins: {
display: false,
} Part 2: in our tailwind.css /*
Tailwind adds .table-classes as part of its display-corePlugin.
Those are in conflict with Bootstrap's .table.
Therefore, we disable the plugin in tailwind.config.js
and add all but the .table*-Util classes back manually below.
List of display corePlugin classes https://github.com/tailwindlabs/tailwindcss/blob/master/src/plugins/display.js
*/
@layer utilities {
@responsive {
.block {
display: block;
}
.inline-block {
display: inline-block;
}
.inline {
display: inline;
}
.flex {
display: flex;
}
.inline-flex {
display: inline-flex;
}
.flow-root {
display: flow-root;
}
.grid {
display: grid;
}
.inline-grid {
display: inline-grid;
}
.contents {
display: contents;
}
.hidden {
display: none;
}
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
simonswiss
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What we ended up doing:
Part 1: in our tailwind.config.js
Part 2: in our tailwind.css