Answer the question
In order to leave comments, you need to log in
How to use sass in a project/team so that others continue to use css?
Hello!
I keep up with the times and use sass, but there are still many developers who use only css and do not even know what it is and how convenient it is.
But I'm already tired of using pure css and want to use sass. But how to do it so that others can only edit css, commit edits, and I can work on this matter in sass.
That is, I'm looking for a kind of bidirectional sass / css converter. How I see it:
1) I write sass code. I compile into a single css file, make a commit. At the same time, all sass is hidden in gitignore from prying eyes, so as not to frighten inexperienced developers.
2) Others edit this css, commit it. I pull myself and here the magic should happen: the taskmanager or similar software should compare the changes in the new css and my sass and somehow compose this thing. But I'm afraid there must be some special magic
. In general, who has come across this, how can this be done?
Answer the question
In order to leave comments, you need to log in
I think, in the general case, no way, because the output SASS code corresponds to a single version of the CSS code. But if there is CSS code, then it can be matched with countless SASS options.
Of course, there are things like css2sass , but it will not give a normal human SASS code with variables, impurities and other things.
I don’t know how many edits are made by inexperienced developers, but as an option, make a separate css for them in which they will make edits, and then you will transfer everything to SASS.
Well, it's better, of course, to gather all these developers and give a short presentation on SASS. Teach at least basic skills for the job.
It is necessary to transplant unreasonable layout designers to SASS by force. For example, rename the .css files to .scss or run them through css2sass.herokuapp.com , then explain to them how to compile the resulting files into CSS. At the initial stage, mixins should not be used at all.
Offtopic: are you collecting answers for some magazine? Your questions are very different.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question