Skip to content

Support properties that include a template variable #13

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;
`;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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