Skip to content

Support properties that include a template variable #13

@mikewheaton

Description

@mikewheaton

Describe the bug
When variables are inserted within properties, the plugin is splitting up the value onto multiple lines.

To Reproduce
Sorting this styled component:

const Avatar = styled.img`
  border-radius: 50%;
  margin-bottom: 16px;
  height: ${AVATAR_SIZE}px;
  width: ${AVATAR_SIZE}px;
`;

Results in:

const Avatar = styled.img`
  border-radius: 50%;
  height: ${AVATAR_SIZE}
  margin-bottom: 16px;
  px;
  px;
  width: ${AVATAR_SIZE}
`;

Expected behavior

const Avatar = styled.img`
  border-radius: 50%;
  height: ${AVATAR_SIZE}px;
  margin-bottom: 16px;
  width: ${AVATAR_SIZE}px;
`;

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