CodeKit icon indicating copy to clipboard operation
CodeKit copied to clipboard

Sass Migration Tool

Open EkoOne opened this issue 4 years ago • 5 comments

A feature request for a Sass migration tool as the framework is officially moving towards a module-based structure which will continually be updated with new "modules" (functionality) that will require ongoing tweaking/migration of preexisting code.

EkoOne avatar Feb 03 '21 17:02 EkoOne

AFAIK, the new module system in SASS consists of some new language additions - e.g., use as an alternative to import - which are all optional. From their announcement post:

Please note that the module system is fully backwards-compatible. No existing features have been removed or deprecated, and your current Sass stylesheets will keep working just as they always have. We designed the module system to be fully interoperable with @import to make it easy for stylesheet authors to migrate to it incrementally. We do plan to eventually get rid of @import, but not until long after everyone’s had a chance to migrate.

If I understand correctly, it's up to the individual coder to choose if, when and where to use these new language features, and there is no need to go through our old files and translate 'old Sass' into 'new Sass'. Compilers like CodeKit should continue to work - and compile our Sass files - whether they were written using import or use - at least for quite a while.

iocouto avatar Feb 04 '21 06:02 iocouto

It would be a good idea to start migrating old Sass to @use. You've probably got a year or two until @import dies, but if you procrastinate you're going to be in a world of hurt later on.

bdkjones avatar Feb 04 '21 06:02 bdkjones

..or try converting your stylesheets to LESS, or Stylus. There are some online tools that can automate (most of) the conversion for you already.

iocouto avatar Feb 08 '21 22:02 iocouto

I would not recommend Less and Stylus. They don’t receive updates and development attention like Sass does. I think Sass has won that war, really.

On Feb 8, 2021, at 14:19, Igor Couto [email protected] wrote:

 ..or try converting your stylesheets to LESS, or Stylus. There are some online tools that can automate (most of) the conversion for you already.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

bdkjones avatar Feb 08 '21 22:02 bdkjones

I would not recommend Less and Stylus. They don’t receive updates and development attention like Sass does. I think Sass has won that war, really.

I respectfully disagree, @bdkjones - this is like advising someone that if they want to use a frontend framework, they should ignore Foundation, UIKit, Bulma and everything else and use Bootstrap, because based on popularity 'it has won that war'. Or to advise them to ditch CodeKit and just use webpack/parcel/whatever, because these receive more updates.

Each of these CSS preprocessors has advantages over the others, and the developer is richer for being able to use more than one. LESS, for example, is the only one that has an interpreter that can run in-browser. Stylus has arguably the cleanest, easier-to-learn syntax, and is the only one developed specifically for Node. IMHO, they will be around for quite a while, and if a developer is investing their time in learning them - rather than, say, CSS-in-JS or PostCSS - then I'd recommend them look beyond SCSS, for sure.

iocouto avatar Feb 09 '21 21:02 iocouto