bdkjones / CodeKit

CodeKit 3 Issue Tracker
https://codekitapp.com
82 stars 5 forks source link

Sass Migration Tool #639

Open EkoOne opened 3 years ago

EkoOne commented 3 years ago

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.

iocouto commented 3 years ago

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.

bdkjones commented 3 years ago

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.

iocouto commented 3 years ago

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

bdkjones commented 3 years ago

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 notifications@github.com 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.

iocouto commented 3 years ago

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.