-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] [PostCSS 8] Tailwind apply not working in imported css files #20
Comments
Also cannot get Tailwind 2.1+ working with this as our project also requires PostCSS 8 We wanted to move to Vue 3 with Storybook but that is actually impossible Edit: Related to #19 |
I can confirm I also have this issue, using tailwind 1.9.6 and postcss 7 |
Maybe a stupid question, but what is CRA (as mentioned in #14)? Because I am using Storybook 6.2. So that should not be an issue. |
CreateReactApp I assume |
Hmm, ok. I am using Vue, so I don't that is not really applicable here. |
I can't seem to figure this out, any idea why this happens? |
Any update on PR #19 in relation to this bug? |
I am experiencing this as well with tailwind 2.2.2 and posts 8.3.5 |
I am having the same issue with postcss7 compat. Tailwind works, but not @apply with vue component styles.
... then;
this is in vue3 with <style scoped lang="postcss" /> |
I still get this issue in latest storybook, postcss, and tailwind. package json
postcss.config.js module.exports = {
plugins: {
'tailwindcss/nesting': {},
'tailwindcss': {},
'autoprefixer': {},
},
} .storybook/main.js module.exports = {
'stories': [
'../stories/**/*.stories.@(js|jsx|ts|tsx|mdx)',
'../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'
],
'addons': [
'@storybook/addon-essentials',
'@storybook/addon-links',
'@storybook/addon-a11y',
'@storybook/addon-notes',
'@etchteam/storybook-addon-status',
{
name: '@storybook/addon-postcss',
options: {
postcssLoaderOptions: {
implementation: require('postcss'),
postcssOptions: {
plugins: [
require('tailwindcss/nesting')(),
require('tailwindcss')(),
require('autoprefixer')(),
],
},
},
},
},
],
'framework': '@storybook/vue3',
} |
Did anybody solve this? Any chance to have the @apply directive work in .css imports? |
Did anybody solve this? Any chance to have the @apply directive work in .css imports? |
I use storybook latest version and |
Describe the bug
In my main css files I am importing several other css files to keep things clean and organized.
However, in Storybook, these imported files are not processed and the Tailwind @apply logic is not ... "applied".
Steps to reproduce the behavior
custom.css
file in the./src/styles
folder./src/stories/Playground.stories.tsx
story and add thecustom
class to thediv
so it will look like this:./src/styles/taildwind.css
file:npm run storybook
text-5xl
should be.font-size: 33px
and you will see that the text is huge. So the import is fine.tailwind.css
and notice it also works!So it only seems a problem inside included css files.
If I compile the css using Laravel Mix it does properly parse and
@apply
the css. So it really seems to be a Storybook issue.Expected behavior
The proper css should be
@apply
'd in included css files.System
The text was updated successfully, but these errors were encountered: