Lessify WordPress

描述

LessCSS

LESS extends CSS with dynamic behaviour such as variables, mixins, operations and functions.Implements LessCSS in order to provide lots of interesting features for the theme development.

How to use ?

Just enqueue the LESS files (with .less extension) as it is usually done for the CSS ones, and the corresponding CSS files will automatically be generated and added to the site.

Important Notes

1.This plugin is based on lessphp by Leaf Corcoran

2.This plugin generates the css file under “/wp-content/uploads/lessify-cache” and therefore you need to define your images and any external links on you less file using the themeurl variable available with this plugin and if you use relative url then it will not work as we are saving the css file in a different location.

3.In order to use themeurl variable with the images you can do something like this
`
body{ background-image: url(@{themeurl}/images/bg.png); }“`
the plugin also comes with

another variable lessurl which provides the url where the less file is present.

安装

  • Download the plugin and extract it.
  • Upload the directory ‘/lessify-wp/’ to the ‘/wp-content/plugins/’ directory.
  • 通过WordPress的“插件”菜单激活插件。
  • That’s it you are done, you can now start creating your less files and enqueue to wordpress.

常见问题

What is lessify wordpress?

Now you can write less directly with your wordpress theme and just enqueue them like the traditional wordpress way. This plugin would take care of the rest of the work.

How to add LESS file to your theme?

To enqueue your less file you can simply do like this
wp_enqueue_style( ‘less-style’, get_stylesheet_directory_uri() . ‘/style.less’ );

评价

2016 年 9 月 3 日
The less style sheet is showing up before the child theme style sheet in the source, and I'm not sure how to change this. I wish there was documentation about how to set this up for child themes. Otherwise, it seems good.
阅读所有5条评价

贡献者及开发者

“Lessify WordPress” 是开源软件。 以下人员对此插件做出了贡献。

贡献者

将“Lessify WordPress”翻译成您的语言。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志

更新日志

1.1

  • Fixed: Instalation issue fixed for PHP verison 8.0
  • Code cleanup

1.0

  • Initial release.