承接 pug-php/pug-filter-less 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pug-php/pug-filter-less

最新稳定版本:1.1.0

Composer 安装命令:

composer require pug-php/pug-filter-less

包简介

Render Less code as compiled CSS in a style tag

README 文档

README

Latest Stable Version Build Status Code Climate Test Coverage StyleCI

This template:

//- set from php controller
- $prev = $color

//- set in the pug template
- $color = 'red'

head
  :less
    @prev: yellow;
    p {
      width: 200px;
      color: #{color};
      a {
        color: #{prev};
      }
      em {
        color: @prev;
      }
    }
body
  p
    | I'm
    =color
    |  but my links are
    a=prev
    |  and my quotes are
    em=prev

with data like this:

$pug = new Pug();
$pug->render('template.pug', array(
    'color' => 'red',
));

will be rendered like this:

<head>
  <style type="text/css">
    p {
      color: red;
    }
    p a {
      color: yellow;
    }
    p em {
      color: yellow;
    }
  </style>
</head>
<body>
  <p>
    I'm red but my links are <a>yellow</a> and my quotes are <em>yellow</em>
  </p>
</body>

Security contact information

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

统计信息

  • 总下载量: 88.74k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-14