johnuphoff / vscode-styled-sort

styled-components CSS/SCSS rule sorting for vscode
13 stars 4 forks source link

Does not work with grid-area #12

Open gabdorf opened 5 years ago

gabdorf commented 5 years ago

Before formatting:

const App = styled.div`
  width: 100vw;
  min-width: 1024px;
  height: 100vh;
  display: grid;
  grid-template-columns: 240px auto 240px;
  grid-template-rows: 100px auto;
  grid-template-areas:
    'toppanel toppanel toppanel'
    'leftpanel main rightpanel';
`

After formatting:

`const App = styled.div`
    display: grid;
    grid-template-areas:
    grid-template-columns: 240px auto 240px;
    grid-template-rows: 100px auto;
    height: 100vh;
    min-width: 1024px;
    width: 100vw;
    'leftpanel main rightpanel';
    'toppanel toppanel toppanel'
`
mrwwalmsley commented 3 years ago

I've done a rewrite that addresses this issue. Need to know whether to submit as a PR or publish as a new plugin.