Skip to content

Spurious warnings about layout tokens in calc(-1 * ...). #126

Open
@wkeese

Description

@wkeese

Given:

@use "@carbon/layout" as layout;
...
.foo {
  margin-top: calc(-1 * #{layout.$spacing-01});
}

We get the spurious carbon/layout-use error that:

229:15 ⚠ Expected calc of the form calc(P O #{$}) or calc(-1 * #{$}). Where 'P' is in (vw, vh or %), 'O' is + or -, '$' is a carbon layout token, mixin or function for "margin-top" found "calc(-1 * #{layout.$spacing-01})".

(In reality, layout.$spacing-01 is a carbon layout token.)

Same spurious error with

.foo {
  margin-top: -#{layout.$spacing-01};
}

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