Skip to content

Building breaks css with calc and var and double brackets #13511

@VulumeCode

Description

@VulumeCode
  1. create a new app
  2. edit App.css
    add this to the rule for .App-header
  --margin: 1.5em;
  margin: calc((var(--margin)/2));

notice the redundant braces in calc.

  1. run the project in dev mode, it has a margin as expected.
  2. build the project and serve it, there is no margin to be seen.
  3. look at the generated main.xxxx.css, calc is gone! margin:(var(--margin)/2) is a broken rule!

Some research:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions