skip to Main Content

Having css file where the structure is like this:

#something > div {
...
}

When it is saved, it removes the spaces around > and it makes it look like this:

#something>div {
...
}

Is there a way to avoid this in VS Code?

2

Answers


  1. Replace space –

    --space--- > --space--- replace to  = >
    

    enter image description here

    Login or Signup to reply.
  2. I haven’t encountered this in VS Code. But I did find this setting in Preferences>Settings that may be the solution.

    enter image description here

    I do not have it checked and I don’t have the same issue you report. Perhaps another setting elsewhere causes it.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search