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

Remove or rename invalid -styled-mixin0 CSS properties caused by using mixins #271

@jroebu14

Description

@jroebu14

Would it be possible to prevent outputting invalid CSS properties that would fail a CSS syntax validation plugin such as csstree/stylelint-validator?

An example of this would be when using a mixin:

const example = css`
  ${({ height }) => height ? `height: ${height};` : ''}
  width: 100%;
`;

which the processor might output

.selector1 {
  -styled-mixin0: dummyValue;
  width: 100%;
}

My suggestion would be to wrap -styled-mixin0: dummyValue; in a CSS comment or prefix it with one more dash to turn it into a custom property e.g. --styled-mixin0: dummyValue;

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