Bug #66

Less vs. Stylus

Added by Dylan Schiemann over 5 years ago. Updated over 5 years ago.

Status:In Progress Start date:05/30/2012
Priority:Normal Due date:06/05/2012
Assignee:Colin Snover % Done:

0%

Category:-
Target version:Release 1.8

Description

Gather details on less vs stylus or other options at http://plan.dojotoolkit.org/projects/general-requests/wiki/Less_vs_Stylus

History

Updated by Colin Snover over 5 years ago

LESS:

  • Does not have an operator for assigning a variable only if it does not exist yet, which makes overriding variables of @imported children difficult/impossible
  • Breaks when trying to use relative CSS paths consistently across client & server
  • Breaks when trying to use variables inside url()s
  • Starts duplicating CSS rules when the same LESS file is @imported multiple times
    • This happens when you import more than one of the claro LESS files with variables.less
  • Does not have transparent mixins
  • Author is extremely unresponsive to requests on GitHub and refuses to add new committers because he does not trust other people to make changes to the code directly
  • Codebase is unwieldy and nearly impossible to patch/maintain; no abstraction for each platform or a standard way to infer the correct platform
  • Error reporting frequently fails, especially in browser, leading to confusion about what happened
  • Way too many open issues (300+) and pull requests (80+) dating back a year or more

Stylus:

  • Does not have any of the issues that LESS has
  • Supports nearly all the same features LESS does, plus transparent mixins, plus inheritance (like SASS), plus advanced functions, plus conditional assignment
    • Conditional assignment means e.g. don’t redefine a variable’s value if it already exists; this means that claro stylus files could be imported by a parent stylus file that modifies its variables or be compiled stand-alone with no problem
    • Advanced functions allow things like background-image: linear-gradient(#fff, #000) to be converted correctly to the old-style -webkit-linear-gradient syntax even though it is very different; the nib extension includes all the necessary code already to do this
  • nib extension also allows gradient images to be generated on the server at compile time for oldie
  • Author is reportedly fairly responsive to issues
  • Very stable
  • Requires some discipline to avoid shooting oneself in the foot due to its very lax syntax parsing

Updated by Tom Trenka over 5 years ago

Depending on Bill's approach, let's aim this for the 2.0 line once 1.8 is out the door.

I'd also suggest that the 1.x line remains on LESS, for consistency's sake.

Also available in: Atom PDF