Skip to content
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

tailwind in less error #7952

Closed
yuyeqianxun opened this issue Mar 26, 2022 · 3 comments
Closed

tailwind in less error #7952

yuyeqianxun opened this issue Mar 26, 2022 · 3 comments

Comments

@yuyeqianxun
Copy link

.navhead { @apply h-[60px] bg-[#074f51] border-b-[3px] border-[#c0a280]; }
Like this,vite will report:

The h- class does not exist. If h- is a custom class, make sure it is defined within a @layer directive.

But if i adjust my code
.navhead { @apply bg-[#074f51] h-[60px] border-b-[3px] border-[#c0a280]; }
It works.So i cant write styles like h or p first.Otherwise,it will be wrong
What version of Tailwind CSS are you using?
3.0.23
What build tool (or framework if it abstracts the build tool) are you using?

For example: postcss-cli 8.3.1, Next.js 10.0.9, webpack 5.28.0

What version of Node.js are you using?

For example: v12.0.0

What browser are you using?

For example: Chrome, Safari, or N/A

What operating system are you using?

For example: macOS, Windows

Reproduction URL
https://stackblitz.com/edit/vitejs-vite-fbjupx?file=package.json&terminal=dev
Describe your issue

Describe the problem you're seeing, any important steps to reproduce and what behavior you expect instead.

@adamwathan
Copy link
Member

Hey! The reproduction you provided is working as expected:

image

You can see height: 40px there in the CSS 👍

Going to close — if this is still an issue for you please include a reproduction that actually demonstrates the error. I'm not sure what exactly to test since you mention Less in the issue title but your reproduction is using Sass, and unfortunately we just can't invest time trying to reproduce issues without clear reproduction steps — we just wouldn't be able to keep up with all of the questions. Hope that's understandable — again happy to take a look if you can provide a better reproduction.

@yuyeqianxun
Copy link
Author

@adamwathan
sorry,bro,i test css、sass and less in example,only less cause error,but i forgot change it to wrong one.
this is new example only include less.
example
best wish and thank you!

@dabaii
Copy link

dabaii commented Jun 29, 2022

@adamwathan sorry,bro,i test css、sass and less in example,only less cause error,but i forgot change it to wrong one. this is new example only include less. example best wish and thank you!

我也发现了这个错误。目前测试还是没有修复这个问题。 这个问题已经被关闭了。估计作者不会在看到你后面提交的example了。 已经重新开了一个 bug issues 你可以关注一下#8738

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants