Skip to content

The space before the "-" is missing when using CSS variables #233

Closed
@Eoyo

Description

@Eoyo
TypeScript before transform:

  declare const styled: any;
  const ValueCalc = styled.div \`
    height: calc(var(--line-height) - 5px);
    width: calc(100% - 5px);
  \`;
  

TypeScript after transform:

  declare const styled: any;
  const ValueCalc = styled.div \`height:calc(var(--line-height)- 5px);width:calc(100% - 5px);\`;
  

There is no problem when using only the calc method, but there is a bug when combined with the var method. Browser can't parse missing spaces before '-'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions