Skip to content
This repository was archived by the owner on Apr 6, 2021. It is now read-only.
This repository was archived by the owner on Apr 6, 2021. It is now read-only.

Custom "important" variant not working #92

Closed
@jameslkingsley

Description

@jameslkingsley

This particular variant isn't working right now (0.1.2):

addVariant('important', ({ container }) => {
    container.walkRules(rule => {
        rule.selector = `.\\!${rule.selector.slice(1)}`

        rule.walkDecls(decl => {
            decl.important = true
        })
    })
})

The expected classes (eg. !bg-red) aren't generated/kept when evaluating this kind of markup (<p class="!text-red">)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions