Is there any way to hoist base rules to the top of the stylesheet in the Tailwind plugin system? #7729
-
I'm trying to create a plugin for my org that contains a css I wanted to have an optional plugin handle this... However, the injection spot is quite a ways down. Is there any way to get this to the top? export const FontImport = plugin.withOptions(function (options) {
return function ({ addBase }) {
addBase({
"@import url('https://assets.bw.io/font-service/css/HaasText:*/styled-font-face.css')":
"",
});
};
}); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Currently not I'm afraid but this is a good point! We could probably add a step that sorts You could write a pretty simple PostCSS plugin to handle this though in the mean time, just make sure it runs after Tailwind 👍 |
Beta Was this translation helpful? Give feedback.
Currently not I'm afraid but this is a good point! We could probably add a step that sorts
@import
rules to the top of the file automatically so you don't have to think about this.You could write a pretty simple PostCSS plugin to handle this though in the mean time, just make sure it runs after Tailwind 👍