@nemos
2017-05-06T02:48:13.000000Z
字数 1341
阅读 788
web
/************************** 变量 **************************/
$font-stack: Helvetica, sans-serif
$primary-color: #333
body
font: 100% $font-stack
color: $primary-color
/************************** 嵌套 **************************/
nav
ul
margin: 0
padding: 0
list-style: none
li
a
display: block
padding: 6px 12px
text-decoration: none
/************************** 混合 **************************/
=border-radius($radius)
-webkit-border-radius: $radius
-moz-border-radius: $radius
-ms-border-radius: $radius
border-radius: $radius
.box
+border-radius(10px)
//////////////////////////////////////////////////////////
.box {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-ms-border-radius: 10px;
border-radius: 10px;
}
/************************** 继承 **************************/
.message
border: 1px solid #ccc
padding: 10px
color: #333
.success
@extend .message
border-color: green
.error
@extend .message
border-color: red
/************************** 运算 **************************/
.container
width: 100%
article[role="main"]
float: left
width: 600px / 960px * 100%
aside[role="complementary"]
float: right
width: 300px / 960px * 100%
pageTitle = "Jade Rocks!"
doctype 5
html(lang="en")
head
title= pageTitle
script
console.log("hi");
body
p.greeting Hello, World!
<!DOCTYPE html>
<html lang="en">
<head>
<title>Jade Rocks!</title>
<script>console.log("hi");
</script>
</head>
<body>
<p class="greeting">Hello, World!</p>
</body>
</html>