Skip to content

Getting duplicated namespace using namespace plugin #340

@jamespantalones

Description

@jamespantalones

Hi, I am confused by namespace plugin usage. I am seeing the following:

Input Value

.css--root-container {
  color: blue;
}

:global(p){
  color: red;
}

Usage:

const processed = serialize(compile(`.dvz-content{${inputValue}}`), middleware([namespace, stringify]));

output value

.css--root-container.dvz-content.dvz-content {
  color:blue;
}
p {
  color:red;
}

Why is my namespace INSIDE the selector and also duplicated?

This looks like it is also in a test like this?

expect(serialize(compile(`.user:before{color:red;}`), middleware([namespace, stringify]))).to.equal([
      `:before.user.user{color:red;}`
    ].join(''))
    ```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions