stylus , another css processor
1. install from npm
sudo npm install stylus
2. create a styl file named step1.styl
border-radius() {
-webkit-border-radius: arguments
-moz-border-radius: arguments
border-radius: arguments
}
body a {
font: 12px/1.4 "Lucida Grande", Arial, sans-serif;
background: black;
color: #ccc;
}
form input {
padding: 5px;
border: 1px solid;
border-radius: 5px;
}
3. create a js file for render css from styl file
var stylus = require('stylus');
var str=".{border:1px solid red;}";
str = require("fs").readFileSync("step1.styl", "utf8");
stylus.render(str, { filename: 'step1.styl' }, function(err, css){
if (err) throw err;
console.log(css);
});
https://github.com/Automattic/stylus
stylus , another css processor的更多相关文章
- vue 使用Jade模板写html,stylus写css
vue 使用Jade模板写html,stylus写css 日常工作都是使用vue开发页面和webApp,写的多了就想偷懒简化各种书写方式,所以使用了jade写html,stylus写css,省了很多的 ...
- stylus(css预编译器)
推荐去张鑫旭大神这里详细了解:http://www.zhangxinxu.com/jq/stylus/ 安装 npm install -g stylus 自动编译 $ stylus -w demo.s ...
- vue中使用stylus编写css
安装步骤 cnpm install stylus --save-dev cnpm install stylus-loader --save-dev 写法如下: <style lang=" ...
- CSS预处器的对比——Sass、Less和Stylus
预处器的对比--Sass.LESS和Stylus 转载: 英文原文:http://net.tutsplus.com/tutorials/html-css-techniques/sass-vs-less ...
- 前端学习笔记系列一:6 一种新的css预编译器stylus
stylus是 CSS 的预处理框架.CSS 预处理,顾名思义,预先处理 CSS.那 stylus 咋预先处理呢?stylus 给 CSS 添加了可编程的特性,也就是说,在 stylus 中可以使用变 ...
- CSS+Javascript的那些框架
CSS CSS 制作框架 SASS http://www.oschina.net/p/sass Blueprint http://www.oschina.net/p/blueprintcss Ela ...
- [AngularJS + Webpack] Requiring CSS & Preprocessors
Making your CSS modular is a difficult thing to do, but using Webpack makes this so much easier. By ...
- stylus 详解与引入
Stylus介绍及特点Stylus 是一个基于Node.js的CSS的预处理框架,诞生于2010年,比较年轻,可以说是一种新型语言,其本质上做的事情与 Sass/LESS 等类似, 可以以近似脚本的方 ...
- stylus入门学习笔记
title: stylus入门学习笔记 date: 2018-09-06 17:35:28 tags: [stylus] description: 学习到 vue, 有人推荐使用 stylus 这个 ...
随机推荐
- .net 流(Stream) - StreamWriter和StreamReader、BinaryReader和BinaryWriter
转自:http://www.oseye.net/user/kevin/blog/86 一.StreamWriter和StreamReader 从上一篇博文可知文件流.内存流和网络流操作的都是字节,每次 ...
- [零基础学JAVA]Java SE基础部分-01. Java发展及JDK配置
转自:http://redking.blog.51cto.com/27212/114976 重点要会以下两个方面: 1. 抽象类与接口 2. API==>类集 这是两个最重要部分,这两个部分理解 ...
- std::vector的内存释放
先上一段代码 using namespace std; class A{ public: ~A(){ cout << "deconstruct"; }; }; #inc ...
- Hibernate 基于主键的一对一关联关系随手记
@Test public void testSave() { Boss boss = new Boss(); boss.setName("A-老板"); Company compa ...
- 【转】九步学习python装饰器
本篇日志来自:http://www.cnblogs.com/rhcad/archive/2011/12/21/2295507.html 纯转,只字未改.只是为了学习一下装饰器.其实现在也是没有太看明白 ...
- Linux学习总结(一) windos环境vmware安装centos7
一.在这里我先简单介绍下虚拟化技术[即在一台电脑上虚拟出子系统,而且可能需要多台服务器进行工作,一般都是linux系统做服务器或者学习研究之用], 二来我们可以有效利用一台pc的资源模拟出终端远程访问 ...
- hbase添加大文件
一直使用hbase作大容量存储,因为hbase易于存取. 今天,在录入数据的时候,突然报出一个KeyValue size too large.很是奇怪. 后来发现,该数据特别大,经查源码 privat ...
- C++实现的Buffer类
写C#的同志一定觉得Byte []比C++的 BYTE * 加 Length的方式好的多.一来,只需要一个对象就可以是表示一段字节流,另一方面,由于C#的特性,不需要象C++那样还要记得删除指针.由于 ...
- MVC 实现下拉框
MVC动态实现下拉框的方式有很多种,但是方便快捷的却是很少,现在记录一种常用的下拉框实现方式: 1.先看看视图代码是怎么写的 <div class="form-group col-xs ...
- HTML5对表单的一些有意思的改进
HTML5对表单进行了许多的改进,在这篇文章中,我选择了其中个人认为很有趣的三个变化:自动聚焦,对button元素的改进,把表单元素与非父元素的form表单挂钩进行简单的介绍. 1. 自动聚焦 自动聚 ...