Skip to content

Styled-component: transform property, and invalid space in 'translateX' #8481

Open
@seanders

Description

@seanders

Prettier 2.0.5
Playground link

--parser babel

Input:

styled((props) => {
  return <div {...props}>Thanks for all your hard work</div>
})`
  text-align: left;
  transform: ${() => 'translateX'}(100%);
`

Output:

styled((props) => {
  return <div {...props}>Thanks for all your hard work</div>;
})`
  text-align: left;
  transform: ${() => "translateX"} (100%);
`;

Expected behavior:

styled((props) => {
  return <div {...props}>Thanks for all your hard work</div>;
})`
  text-align: left;
  transform: ${() => "translateX"}(100%);
`;

There shouldn't be a space between translateX and (100%)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:multiparserIssues with printing one language inside another, like CSS-in-JSlang:css/scss/lessIssues affecting CSS, Less or SCSSlang:javascriptIssues affecting JS

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions