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

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.

主站蜘蛛池模板: 乡宁县| 盐津县| 本溪| 西充县| 华亭县| 台南市| 和顺县| 贺兰县| 贡嘎县| 绥江县| 当雄县| 勐海县| 松原市| 额尔古纳市| 即墨市| 宁乡县| 牡丹江市| 三门峡市| 德阳市| 乌兰县| 咸阳市| 呼伦贝尔市| 闽侯县| 新民市| 揭西县| 广宁县| 盐池县| 舞阳县| 洪泽县| 五原县| 蓬安县| 通河县| 东源县| 晋城| 无棣县| 泰顺县| 凭祥市| 谢通门县| 池州市| 宜阳县| 增城市|