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

When I remove transformerRenameClass , there are other problems, and the custom attributes in the class do not take effect. #3

Closed
liwenfengg opened this issue Aug 17, 2022 · 10 comments

Comments

@liwenfengg
Copy link
Contributor

1#issuecomment-1216663855

When I remove transformerRenameClass , there are other problems, and the custom attributes in the class do not take effect.

image

This is the demo repo, you can have a try.

@zguolee
Copy link
Member

zguolee commented Aug 17, 2022

I notice that there are some errors in your configuration, you should set

presetApplet({ enableApplet: !(process.env.UNI_PLATFORM === 'h5') }),
transformerRenameClass({ enableRename: !(process.env.UNI_PLATFORM === 'h5') }),

and delete transformerVariantGroup() then will work.
The bg-[url('https://raw.githubusercontent.com/unocss/unocss/main/playground/public/icon-gray.svg')] maybe a bug, you can try it at https://uno.antfu.me/play/, it does not work too, but there work.

@zguolee
Copy link
Member

zguolee commented Aug 17, 2022

1#issuecomment-1216663855

When I remove transformerRenameClass , there are other problems, and the custom attributes in the class do not take effect.

image

This is the demo repo, you can have a try.

Sorry, I wrote wrong 1#issuecomment-1216663855 .

@liwenfengg
Copy link
Contributor Author

liwenfengg commented Aug 17, 2022

I notice that there are some errors in your configuration, you should set

presetApplet({ enableApplet: !(process.env.UNI_PLATFORM === 'h5') }),
transformerRenameClass({ enableRename: !(process.env.UNI_PLATFORM === 'h5') }),

and delete transformerVariantGroup() then will work. The bg-[url('https://raw.githubusercontent.com/unocss/unocss/main/playground/public/icon-gray.svg')] maybe a bug, you can try it at https://uno.antfu.me/play/, it does not work too, but there work.

Nice work!
Now, only this class="bg-[url('https://raw.githubusercontent.com/unocss/unocss/main/playground/public/icon-gray.svg')]" doesn't take effect

But I found other problems, still about uni-easyinput in uni-ui.

image
image

This is the demo repo, you can have a try.

@zguolee
Copy link
Member

zguolee commented Aug 17, 2022

I find the solution for class="bg-[url('https://raw.githubusercontent.com/unocss/unocss/main/playground/public/icon-gray.svg')]" just delete all the ', from [How to use background images in UNOCSS?](unocss/unocss#1387 (comment)) and we have also made corresponding changes(v0.1.1). Another issue waiting to be solved.

@zguolee
Copy link
Member

zguolee commented Aug 17, 2022

I notice that there are some errors in your configuration, you should set

presetApplet({ enableApplet: !(process.env.UNI_PLATFORM === 'h5') }),
transformerRenameClass({ enableRename: !(process.env.UNI_PLATFORM === 'h5') }),

and delete transformerVariantGroup() then will work. The bg-[url('https://raw.githubusercontent.com/unocss/unocss/main/playground/public/icon-gray.svg')] maybe a bug, you can try it at https://uno.antfu.me/play/, it does not work too, but there work.

Nice work! Now, only this class="bg-[url('https://raw.githubusercontent.com/unocss/unocss/main/playground/public/icon-gray.svg')]" doesn't take effect

But I found other problems, still about uni-easyinput in uni-ui.

image image

This is the demo repo, you can have a try.

We have fixed the problem and thanked the issues provided. In addition, what is the HBuilderX version you use?

@liwenfengg
Copy link
Contributor Author

liwenfengg commented Aug 18, 2022

我注意到您的配置中有一些错误,您应该设置

presetApplet({ enableApplet: !(process.env.UNI_PLATFORM === 'h5') }),
transformerRenameClass({ enableRename: !(process.env.UNI_PLATFORM === 'h5') }),

然后删除transformerVariantGroup()就可以了。可能是一个错误,您可以在bg-[url('https://raw.githubusercontent.com/unocss/unocss/main/playground/public/icon-gray.svg')]上尝试https://uno.antfu.me/play/,它也不起作用,但在那里工作。

干得好!现在,只有这个class="bg-[url('https://raw.githubusercontent.com/unocss/unocss/main/playground/public/icon-gray.svg')]"不生效
但我发现了其他问题,仍然uni-easyinputuni-ui.
图片 图片
这是demo repo,你可以试试。

我们已解决问题并感谢提供的问题。另外,你用的HBuilderX版本是什么?

thanks

The version of HBuilderX I'm using is 3.5.3.20220729

image

when I removed the ' in class="bg-[url('https://raw.githubusercontent.com/unocss/unocss/main/playground/public/icon-gray.svg')]" , It works on the h5 side, but it doesn't work on the app side, either with quotation marks or without quotation marks.

image

This is the demo repo, you can have a try.

@zguolee
Copy link
Member

zguolee commented Aug 18, 2022

Maybe you should turn on the VPN in Android/iOS or change a domestic picture. Static files
and @unocss/preset-attributify may not be as supported as applets. attributify may do it later, but we are not sure.

@liwenfengg
Copy link
Contributor Author

Maybe you should turn on the VPN in Android/iOS or change a domestic picture. Static files and @unocss/preset-attributify may not be as supported as applets. attributify may do it later, but we are not sure.

It takes effect without adding/.
his is really strange.....

image

@liwenfengg
Copy link
Contributor Author

in app side, shortcuts and Attributify Mode Still not supported

text="base #F2FF"

attributify-mode

image

@zguolee
Copy link
Member

zguolee commented Aug 18, 2022

attributify is not sure if it can be achieved in the end, we will try it later, but not now, you can open a new issue.

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

2 participants