Skip to content

CSS Variables defined using an interpolated name rejected #63

Open
@lee-chase

Description

@lee-chase

May need to raise an issue against stylelint/postcss-scss as this fails.

NOTE: This does not even get as far as calling checkRule!

    {
      // TODO: fix this - fails to even get into
      code: "$block: 'block'; :root {--#{$block}__value-accept: $layer-01;} .foo { color: var(--#{$block}__value-accept); }",
      description:
        "Accept --#{block}-variable declared before use with Carbon theme tokens."
    },

This works but cheats on the custom property declaration.

    {
      code: "$block: 'block'; :root {--block-value-accept: $layer-01;} .foo { color: var(--#{$block}-value-accept); }",
      description:
        "Accept --#{block}-variable declared before use with Carbon theme tokens. Cheats on custom property declaration"
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions