[wp-trac] [WordPress Trac] #22862: Consider a CSS preprocessor

WordPress Trac noreply at wordpress.org
Mon Aug 5 22:23:44 UTC 2013


#22862: Consider a CSS preprocessor
-----------------------------+------------------------------
 Reporter:  chriswallace     |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Administration   |     Version:
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+------------------------------

Comment (by bpetty):

 Since there's more activity on this again lately, I figure it's a good
 time to update everyone on recent developments on SASS since they might be
 relevant here.

 Since this ticket was first opened, there is now a sponsored effort
 working towards the [https://github.com/hcatlin/libsass libsass] project,
 opening up non-ruby implementations, and eventually replacing the ruby
 version altogether way down the road (with a ruby binding on libsass). In
 fact, there's also already at least two PHP
 [https://github.com/jamierumbelow/sassphp libsass]
 [https://github.com/bzick/php-sass bindings] I've found in the works, and
 while they are still incredibly young, unstable, and mostly unusable, this
 is the direction we're headed with eventually including a SASS compiler as
 a built-in PHP extension without any other external dependencies.

 Of course, this is all still a *long* way away (I'd say about 8 to 10
 years) from being something WP could take advantage of for core
 development, but it's not like core devs wouldn't already have to install
 additional tools to compile LESS anyway. However, when we break it down
 there, installing lessc frequently gets new devs caught up with installing
 npm/node/etc, but with SASS we will have a command line tool written in C,
 built on libsass much sooner that doesn't have any other dependencies. We
 would be looking at native platform binaries with super simple installers
 and distro packages, no extra npm package management and environment
 configuration.

 If you follow development on these projects much, you might find one of
 the latest podcast interviews with the inventor of SASS and founder of
 libsass interesting that covers much of this work:
 http://5by5.tv/changelog/94

 There isn't any effort along these lines for LESS (at least JS is already
 much more portable than Ruby anyway).

 As for my opinion...

 When I compare the two precompilers, I generally agree the most with [http
 ://css-tricks.com/sass-vs-less/ this comparison of the language features].
 So when I take the above developments into consideration along with the
 comparisons on language features (which I find SASS is much stronger in
 due mostly to limitations of the browser-side LESS compiler holding LESS
 back), it's still easy to consider LESS for tiny, quick projects, but not
 for large-scale projects like this with many collaborators. There's a huge
 benefit to making use of the Compass library for SASS for WordPress core
 too, assuming it's not too much to ask for newbie devs and designers to
 learn and really make good use of anyway.

 @dd32 may have also nailed it too:

 Replying to [comment:5 dd32]:
 > It also seems obvious that we'd want to implement a pre-processor which
 is written in PHP for maximum flexibility and server-side regeneration
 during development.

 Although, I guess that's still possible with
 [https://github.com/leafo/lessphp lessphp], it would just be a pity to
 have to bundle that somewhere unless we also got around to
 [http://core.trac.wordpress.org/ticket/23912 adopting composer].

--
Ticket URL: <http://core.trac.wordpress.org/ticket/22862#comment:34>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list