Skip to content

[bug] Falsy properties are not discarded #491

@Looky1173

Description

@Looky1173
const Title = styled("h1")`
  font-weight: bold;
  color: dodgerblue;
  background-color: ${(props) => (props.background ? "lightblue" : null)};
`;

When the background property is null or false, background-color is not stripped from the generated CSS.

image

CodeSandbox demontrating the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions