安装
快速入门
使用变量
嵌套CSS 规则
导入SASS文件
静默注释
混合器
使用选择器继承来精简CSS
小结
中文文档
特色功能
语法格式
使用 Sass
CSS 功能拓展
注释 /* */ 与 //
SassScript
@-Rules 与指令
控制指令
混合指令
函数指令
输出格式
拓展 Sass
拓展 Sass - Sass基础文档 - 笔下光年
网站首页
拓展 Sass
Sass 提供了很多高级自定义功能,使用这些功能需要有良好的 Ruby 基础。 #### 12.1. 自定义 Sass 函数 (Defining Custom Sass Functions) 通过 Ruby API 可以自定义 Sass 函数,具体请查看 [source documentation](https://sass-lang.com/documentation/modules#adding_custom_functions "source documentation")。 #### 12.2. 存储缓存 (Cache Stores) Sass caches parsed documents so that they can be reused without parsing them again unless they have changed. By default, Sass will write these cache files to a location on the filesystem indicated by :cache_location. If you cannot write to the filesystem or need to share cache across ruby processes or machines, then you can define your own cache store and set the:cache_store option. For details on creating your own cache store, please see the source documentation. #### 12.3. 自定义导入 (Custom Importers) Sass importers are in charge of taking paths passed to @import and finding the appropriate Sass code for those paths. By default, this code is loaded from the filesystem, but importers could be added to load from a database, over HTTP, or use a different file naming scheme than what Sass expects. Each importer is in charge of a single load path (or whatever the corresponding notion is for the backend). Importers can be placed in the :load_paths array alongside normal filesystem paths. When resolving an @import, Sass will go through the load paths looking for an importer that successfully imports the path. Once one is found, the imported file is used. User-created importers must inherit from Sass::Importers::Base.
上一篇:
输出格式