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

伪元素 before:content-[*] 使用 arbitrary value 编译后存在未转译的反斜杠 #79

Closed
theoolee opened this issue Aug 15, 2022 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@theoolee
Copy link

theoolee commented Aug 15, 2022

Taro 3.5 / React

字典是否漏掉了这种情况

@theoolee theoolee added the bug Something isn't working label Aug 15, 2022
@sonofmagic
Copy link
Owner

是的,漏了这种情况,我加几个测试用例,待会发布一下

@sonofmagic
Copy link
Owner

我在 1.7.2 版本中修复了这个问题

另外你这个写法应该参考的是 https://tailwindcss.com/docs/hover-focus-and-other-states#before-and-after

<label class="block">
  <span class="after:content-['*'] after:ml-0.5 after:text-red-500 block text-sm font-medium text-slate-700">
    Email
  </span>
  <input type="email" name="email" class="mt-1 px-3 py-2 bg-white border shadow-sm border-slate-300 placeholder-slate-400 focus:outline-none focus:border-sky-500 focus:ring-sky-500 block w-full rounded-md sm:text-sm focus:ring-1" placeholder="[email protected]" />
</label>

用的时候需要给 before:content-['*'] 加引号哟。

@theoolee
Copy link
Author

我在 1.7.2 版本中修复了这个问题

另外你这个写法应该参考的是 https://tailwindcss.com/docs/hover-focus-and-other-states#before-and-after

<label class="block">
  <span class="after:content-['*'] after:ml-0.5 after:text-red-500 block text-sm font-medium text-slate-700">
    Email
  </span>
  <input type="email" name="email" class="mt-1 px-3 py-2 bg-white border shadow-sm border-slate-300 placeholder-slate-400 focus:outline-none focus:border-sky-500 focus:ring-sky-500 block w-full rounded-md sm:text-sm focus:ring-1" placeholder="[email protected]" />
</label>

用的时候需要给 before:content-['*'] 加引号哟。

是的,我掉了引号。非常感谢大佬的及时修复👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants