承接 10usb/css-lib 相关项目开发

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

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

10usb/css-lib

Composer 安装命令:

composer require 10usb/css-lib

包简介

Library for reading / writing css

README 文档

README

This library allowes you parse a Cascading Style Sheets (CSS) document from which you can query property values given a path. The translation with of without inheritance of the values is up to you to decide. This gives you the freedom to create your own rules.

The path to construct is stack based, therefore it is easily implemented in recursive procedures. For example traversing a DOM structure.

As an extra this library supports is the ability to minify or reformat the contents by loading it and then respoduce with a new format.

Example

$document = new Document();

$parser = new Parser($document->addSegment('style.css')); // could be any name
$parser->setSource(file_get_contents('style.css'));
$parser->parse();


$path = new Path($document, new ExampleTranslator());
$path->push()->setTagName('html');
$path->push()->setTagName('body');
$path->push()->setTagName('section')->addClass('slides');

// prints the height value the section slide would get
echo $path->getValue('height');

TODO's

  • Support for At-Rules
  • Default example kit for a HTML inliner
  • Make a HTMLify formatter set

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-07-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固