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-['']" doesn't work in class property uno/windi preset #1820

Closed
ErriourMe opened this issue Oct 29, 2022 · 4 comments
Closed

Comments

@ErriourMe
Copy link

I'm trying to write ul>li menu with dots.

If I used before:content-[''] like in code below, then nothing happens, there is no class in browser.

<li
    v-for="(item, i) in navList"
    :key="`menu-item-${i}`"
    class="text-base text-white flex items-center before:(block rounded-full w-1 h-1 mx-7 bg-white/15 content-[''])"
>
    <NuxtLink :to="item.link">{{ item.title }}</NuxtLink>
</li>

But if I'm trying to @apply class, all works fine

<style lang="scss">
.menu {
  ul {
    li {
      @apply before:(content-['']);
    }
  }
}
</style>

Why?

Deps:

  • Nuxt 3: rc.12
  • @unocss/nuxt: 0.46.1
@ErriourMe ErriourMe changed the title "before:content-['']" doesn't work in uno/windi preset "before:content-['']" doesn't work in class property uno/windi preset Oct 29, 2022
@chu121su12
Copy link
Collaborator

The default splitter will split on ' so content-[''] usually is not available. You may use content-none instead.

@sail-sail
Copy link

<div class="after:content-[':']"></div>
can no work?

@zyyv
Copy link
Member

zyyv commented Oct 31, 2022

<div class="after:content-[':']"></div> can no work?

try content-[quoted::], you can get more infos in #1741.

@sail-sail
Copy link

<div class="after:content-[':']"></div> can no work?

try content-[quoted::], you can get more infos in #1741.

Yes , It work, Thank You!

@antfu antfu closed this as completed Oct 31, 2022
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

5 participants