[wordpress插件] BW LESS-CSSBW LESS-CSS

wordpress 插件 文章 2020-03-14 19:10 493 0 全屏看文

AI助手支持GPT4.0

评分
100
描述

LESS-CSS is a powerful CSS pre-processor that lets you simplify and speed up CSS development and extend existing CSS functionality.

LESS-CSS是功能强大的CSS预处理程序,可让您简化和加快CSS开发并扩展现有CSS功能。

The #BW LESS-CSS plugin integrates the .LESS language into WordPress and adds a simple admin interface to easily attach LESS stylesheets to your theme.

#BW LESS-CSS插件将.LESS语言集成到WordPress中,并添加了一个简单的管理界面,可轻松将LESS样式表附加到您的主题。

For more advanced developers, there is also a basic API that lets you directly access the LESS-to-CSS processor to manually attach your LESS stylesheets.

对于更高级的开发人员,还有一个基本API,可让您直接访问LESS-to-CSS处理器以手动附加LESS样式表。

安装步骤

    1. Upload bw-less-css folder to your /wp-content/plugins/ directory
    2. 将bw-less-css文件夹上传到您的/ wp-content / plugins /目录

    3. Activate the plugin in WordPress admin
    4. 在WordPress管理员中激活插件

    5. Attach .less files to your template using the plugin admin page, under #BW Options -> LESS-CSS

    6. 在#BW选项-> LESS-CSS
      下,使用插件管理页面将.less文件附加到模板中

      3a.

      3a。

      Specify files relative to your theme root (eg. style.less for a file in the root)

      指定相对于主题根目录的文件(例如,根目录中的文件为style.less)

      3b.

      3b。

      If using a specialty stylesheets (eg. for print), select the media type

      如果使用特殊样式表(例如,用于打印),请选择媒体类型

      3c.

      3c。

      To target mobile devices, check the mobile checkbox (see FAQ below)

      要定位移动设备,请选中移动复选框(请参见下面的常见问题解答)

      3d.

      3d。

      To minify (compress) the compiled CSS, check the minify checkbox

    7. 要缩小(压缩)已编译的CSS,请选中“缩小”复选框

    Manually include .less files:

    手动添加.less文件:

    To hard-code a .less file into a template, use in a template file, called by after_setup_theme action.

    要将.less文件硬编码到模板中,请在after_setup_theme动作调用的模板文件中使用 <?php bw_less_css($ file,$ args = array())?>

      <?php

    add_action( 'after_setup_theme', 'lesscss_include' );

    add_action('after_setup_theme','lesscss_include');

    function lesscss_include() {    

    函数lesscss_include(){    

    bw_less_css( 'style.css' );    

    bw_less_css('style.css');    

    bw_less_css( 'css/print.css', array( 'media' => 'print', 'minify' => true, 'mobile' => false, 'force' => false );

    bw_less_css('css / print.css',array('media'=>'print','minify'=> true,'mobile'=> false,'force'=> false);

    }

    }

    ?>

    ?>

    Files are relative to the theme root, and the less compiler will save the .css to the same path as the .less file.

    文件是相对于主题根目录的,较少的编译器会将.css保存到与.less文件相同的路径。

    If you are using @import to compile multiple stylesheets into a single file, such as Twitter’s Bootstrap, turn on developer mode while developing to force the stylesheets to recompile every time the page is loaded.

    如果您使用@import将多个样式表编译成一个文件(例如Twitter的Bootstrap),请在开发时打开开发人员模式,以强制每次加载页面时重新编译样式表。

    If developer mode is off, imported stylesheets will not be recompiled unless you re-save the main stylesheet.

    如果关闭开发人员模式,则除非重新保存主样式表,否则不会重新编译导入的样式表。

    If manually including less files using bw_less_css(), set ‘force’ => true argument.

    如果使用bw_less_css()手动添加较少的文件,请设置“ force” => true参数。

下载地址
https://downloads.wordpress.org/plugin/bw-less-css.zip
-EOF-

AI助手支持GPT4.0