Answer the question
In order to leave comments, you need to log in
Is it possible in some editor, such as Sublime Text, to enable automatic addition of styles in style.css, according to the structure of the html file?
For example, there is a piece of code:
<div>
<div class="setk right">
<div class="img"></div>
<div class="text">
<h3>Оформим ЭЦП для ЕГАИС</h3>
<p>Оформим электронную подпись для подписания документов и деклараций в ЕГАИС</p>
</div>
</div>
<div class="setk left">
<div class="img"></div>
<div class="text">
<h3>Установим программы для работы с ЭЦП</h3>
<p>Установим актуальные сертифицированные версии программ для работы с ЭЦП на портале ЕГАИС: «КриптоПро CSP» и «ЕГАИС Крипто»</p>
</div>
</div>
<div class="setk right">
<div class="img"></div>
<div class="text">
<h3>Настроим рабочее место</h3>
<p>Настроим рабочее место для работы сертификата электронной подписи</p>
</div>
</div>
<div class="setk left">
<div class="img"></div>
<div class="text">
<h3>Зарегистрируем в ЕГАИС</h3>
<p>Зарегистрируем на портале ЕГАИС «Учет древесины и сделок с ней»</p>
</div>
</div>
<div class="setk">
<div class="img"></div>
<div class="text">
<h3>Обучим работе в ЕГАИС</h3>
<p>Обучим работе с системой, расскажем все нюансы заполнения и отправки деклараций по учету древесины</p>
</div>
</div>
</div>
</div>
.setk {}
.setk .img {}
.setk .text {}
Answer the question
In order to leave comments, you need to log in
You won't be able to do this with the basic sublime tools. Firstly, this is a simple code editor, not an IDE at all, it can be configured in some IDE, but I don’t use them.
Theoretically, this can be done with nodejs. True, it will take a very long time to think, write regular expressions, write cases for id, class and other attributes. The node has all the necessary basic modules to implement such an idea, which can be turned into a plugin. I haven't seen the like yet. I would use this set of modules (yes yes - you need it - don't be lazy and write =) ).
https://nodejs.org/dist/latest-v8.x/docs/api/path.html find files
https://nodejs.org/dist/latest-v8.x/docs/api/fs.html get control and reading html files, pulling out the right one, writing and adding css
https://nodejs.org/dist/latest-v8.x/docs/api/event... for callbacks to change fs.watch files and recompile.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question