Skip to content

Incorrect validation of css calc in combination with var (missing upstream sync with css-validator) #1284

@tkalmar

Description

@tkalmar
<!DOCTYPE html>
<html lang="">
<head>
<title>Test</title>
<style>
  #some {
    --myvar: 0;
    margin-top: calc(0px * (1 - var(--myvar)));
    margin-bottom: calc(0px * var(--myvar));
  }

</style>
</head>
<body>
</body>
</html>
    Error: CSS: margin-top: The types are incompatible.

    At line 8, column 46

    - var(--myvar)));↩    margin-b

    Error: CSS: margin-bottom: One operand must be a number.

    At line 9, column 43

     * var(--myvar));↩  }↩↩</style

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions