'Converting stylus to less (css)

I have a project and using Stylus for my css.

For reasons I don't want to go into right now, I want to switch to LessCSS.

I'd like to keep the file structure (imports and all), and also keep the color values what they are (hsl, hsla, rgb, etc) and not have them all convert to #hex.

I'd also like to keep any variables and macros I've defined ..

Of course, I prefer not to do it manually!!

How can I achieve that?



Solution 1:[1]

I just found this library while googling how we will upgrade to Angular 12:
https://github.com/txs1992/stylus-converter

Solution 2:[2]

This page has several converters http://csspre.com/convert

If the Stylus to Less conversion doesn't yield the desired results you can try converting to Sass first and then to Less.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mateo Tibaquira
Solution 2 Alexander Futekov