官术网_书友最值得收藏!

Introduction

In the Using Sass interactive mode and SassScript recipe of Chapter 1, Getting started with Sass, and the Using the @debug, @warn and @error directives recipe of Chapter 2, Debugging your code, you have already read about SassScript. In this chapter, you will get a better grip on SassScript. SassScript is small set of extensions of the plain CSS property syntax. You can use SassScript to set property values or generate property or selector names.

Variables enable you to define common use values at a single place. In the first recipe of this chapter, you will get a grip on variables. The second recipe talks about using operations in SassScript to set your property values. It is followed by two recipes, which will explain in detail why and how to use variables.

The next three recipes talk about mixins. Mixins can be used to create CSS code for your output. You can use mixins to set properties, and you can also dynamically create selectors and property names. You can use SassScript inside your mixins. The parameters for your mixins should be values defined by SassScript too.

The seventh recipe discusses the @function directive. You can use this directive to define a Sass function. Sass functions do not generate any output, but return a single value.

主站蜘蛛池模板: 竹北市| 大城县| 宁晋县| 德钦县| 辽源市| 日土县| 天峻县| 松阳县| 阿拉尔市| 淮南市| 兖州市| 北流市| 台东县| 慈溪市| 晋江市| 屯昌县| 兴业县| 柳河县| 清水县| 蕉岭县| 牙克石市| 南京市| 丰台区| 绥德县| 平塘县| 大邑县| 乌拉特前旗| 甘洛县| 华阴市| 历史| 蒲城县| 冷水江市| 眉山市| 班玛县| 威信县| 崇明县| 韶山市| 海城市| 凤冈县| 长治市| 革吉县|