最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

css - What's the best way to add the LESS preprocessor to a WordPress theme?

programmeradmin4浏览0评论

I have looked for a good plugin for using LESS in a WordPress theme and the most relevant options I've found are:

/ (last updated 6 years ago) / (last updated 4 years ago) / (last updated 3 years ago)

LESS still seems to be a good CSS preprocessor and many people use it so why am I having trouble finding an updated solution for that?

I have looked for a good plugin for using LESS in a WordPress theme and the most relevant options I've found are:

https://wordpress/plugins/bw-less-css/ (last updated 6 years ago) https://wordpress/plugins/wp-less-to-css/ (last updated 4 years ago) https://wordpress/plugins/wp-less/ (last updated 3 years ago)

LESS still seems to be a good CSS preprocessor and many people use it so why am I having trouble finding an updated solution for that?

Share Improve this question asked Mar 21, 2018 at 20:20 Marcelo RochaMarcelo Rocha 116 bronze badges 3
  • 2 by "Using LESS in a theme" do you mean in /wp-admin/ on your browser you want to use LESS? or in your wp-content/themes/custom_theme/ you want to use .less? If that latter, most developers would find their own solutions instead of a plugin, thats why so little results. For example the editor I use, Atom, has a package called less-compiler that compiles .less on file-save. Prior to that I would just use the JS CDN version of less while developing, than compile with command line on completion. – David Sword Commented Mar 21, 2018 at 22:20
  • I mean on wp-content/themes/custom_theme/. The WP-LESS just do that, but doesn't have an update for more than 3 years... About the editor you mentioned, it just saves the final CSS file just compiled so we don't need to upload the .less file at all, but just the generated .css one. Yes, makes sense... – Marcelo Rocha Commented Mar 22, 2018 at 1:52
  • 1 I use Sublime Text editor and it has a package called LESS-build that compile LESS saving it as CSS file. Cool. – Marcelo Rocha Commented Mar 22, 2018 at 2:18
Add a comment  | 

1 Answer 1

Reset to default 0

After the comment of David Sword I realized that doesn't exist a best way to use LESS on a WordPress theme, but several ways to do that. And a good way is to use the resources of a good text editor. I'm used to work with Sublime Text 3 but after trying several times to make it work with no success I decided to use another text editor, Crunch 2, and with it I didn't have any problem to compile the .less file to .css, as this is a normal feature of the free version.

发布评论

评论列表(0)

  1. 暂无评论