D
D
DevStranger2018-01-12 00:43:01
css
DevStranger, 2018-01-12 00:43:01

Is it possible to set up auto-formatting for LESS(css) in the code editor?

In my project I use LESS to generate final .css files. The problem is that when I use mixins and describe media queries in them, Visual Studio thinks that there is an error in this place (a colon is expected):
5a57d937d957f630807301.jpeg
And when I press the key combination CTRL + K + D (document auto-formatting), the studio splits the line into two ( due to an error):
5a57d9a70226a388460545.jpeg
As a result, the generated css also turns out to be invalid. Is it possible to somehow change this behavior so that the studio simply ignores this error for less files? I looked in the settings for this option and did not find it. Searched here:
Tools > Options > Text Editor > CSS
Tools > Options > Text Editor > C#
Tools > Options > Text Editor > LESS

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2018-01-12
@kvaak

you can try using Prettier instead of CTRL + K + D
I'm delighted with it, but as a side effect it will most likely solve the transfer problem

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question