If this tool helped you, you can buy us a coffee ☕
Convert Stylus code to standard LESS format. Ideal for frontend project migrations and team collaboration.
When migrating Stylus styles based on indentation syntax to a LESS project that uses curly braces, manual conversion is both time-consuming and error-prone. This tool uses a syntax parser to convert Stylus-specific indentation rules, variable declarations, and mixins into a code structure that complies with LESS specifications, ensuring syntax adaptation while maintaining functional equivalence.
How are Stylus nesting rules converted?
All nested selectors are converted to standard LESS syntax. For example, .parent { & > .child {...} } will be converted to .parent { > .child {...} }.
What needs to be manually adjusted after conversion?
You only need to check for differences in color functions: Stylus's lighten(color, 10%) corresponds to LESS's lighten(color, 10%), but parameter unit handling may require minor tweaks.
Ensure your Stylus code has no syntax errors before converting. For complex projects, we recommend converting file by file. This tool does not process dynamic JS-injected style logic.
Typical conversion example: The Stylus border-radius() mixin should be predefined as .border-radius(@radius) {...} in LESS. We recommend creating a conversion checklist, paying special attention to the post-processing of the @extend syntax and loop structures.