- 授权协议: CC0 1.0
- 开发语言: JavaScript
- 操作系统: 跨平台
- 软件首页: https://github.com/jonathantneal/precss
软件介绍
Precss 可以在 CSS 文件中使用 Sass 类型的 Markup。
变量
/* before */
$blue: #056ef0;
$column: 200px;
.menu {
width: calc(4 * $column);
}
.menu_link {
background: $blue;
width: $column;
}
/* after */
.menu {
width: calc(4 * 200px);
}
.menu_link {
background: #056ef0;
width: 200px;
}条件
/* before */
.notice--clear {
@if 3 < 5 {
background: green;
}
@else {
background: blue;
}
}
/* after */
.notice--clear {
background: green;
}循环
/* before */
@for $i from 1 to 3 {
.b-$i { width: $(i)px; }
}
/* after */
.b-1 {
width: 1px
}
.b-2 {
width: 2px
}
.b-3 {
width: 3px
}混入
/* before */
@define-mixin icon $name {
padding-left: 16px;
&::after {
content: "";
background-url: url(/icons/$(name).png);
}
}
.search {
@mixin icon search;
}
/* after */
.search {
padding-left: 16px;
}
.search::after {
content: "";
background-url: url(/icons/$(name).png);
}扩展
/* before */
@define-extend bg-green {
background: green;
}
.notice--clear {
@extend bg-green;
}
/* after */
.notice--clear {
background: green;
}导入
/* Before */
@import "partials/_base.css"; /* Contents of _base: `body { background: black; }` */
/* After */
body { background: black; }
程序员2005精华本
《程序员》杂志社 / 电子工业 / 2006-1 / 45.00元
本书为集结了《程序员》杂志与《msdn开发精选》杂志精华。分上、下两册,内容包括人物&报道、管理与实践、程序员手册、年鉴、《程序员》技术专题、《msdn开发精选》文章精选等。一起来看看 《程序员2005精华本》 这本书的介绍吧!
