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的class没有被转化 #170

Open
xu-Aurora opened this issue Dec 12, 2023 · 3 comments
Open

tailwind的class没有被转化 #170

xu-Aurora opened this issue Dec 12, 2023 · 3 comments

Comments

@xu-Aurora
Copy link

在vue3+vite4项目中,我自己写的class是有被转成成vw、vh单位的,但tailwind写的class是没有被转化成vw、vh的。
比如我写class=“pr-[10px]”, 在审查元素里看到是padding-right:10px;

@alinquan
Copy link

在vue3+vite4项目中,我自己写的class是有被转成成vw、vh单位的,但tailwind写的class是没有被转化成vw、vh的。 比如我写class=“pr-[10px]”, 在审查元素里看到是padding-right:10px;

老哥解决没有,遇到同样的问题

@CodewordLiang
Copy link

在vue3+vite4项目中,我自己写的class是有被转成成vw、vh单位的,但tailwind写的class是没有被转化成vw、vh的。 比如我写class=“pr-[10px]”, 在审查元素里看到是padding-right:10px;

tailwind 相当于在给标签加属性, postcss只能做到修改 css或者scss里的单位

@Ccheng2729111
Copy link

理论上你这种行内的样式 需要换一种方式去解决了,它这个只能解决你用class写的样式对应的unit的转换。 像uni-app是魔改了vue的render vnode,在setProp的时候判断如果是需要修改的unit再去动态的改-。-

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

4 participants