13.2. Sass installation

发布时间 : 2025-10-25 13:32:21 UTC      

Page Views: 14 views

In this chapter we mainly introduce the installation and use of Sass.

13.2.1. NPM installation

We can use it. npm (introduction to NPM usage) to install Sass.

npm install -g sass 

Note: domestic npm is recommended to use Taobao image to install

13.2.2. Install on Windows

We can use Windows’s package manager Chocolatey to install:

choco install sass 

13.2.3. Mac OS X (Homebrew) installation

Mac OS can be used Homebrew package Manager to install:

brew install sass/sass/sass 

More installation methods can be found on the official website: https://sass-lang.com/install

13.2.4. Introduction to use

Our tutorial uses npm for the installed sass, you can view the version after the installation is complete:

$sass– version 1.22.12 compiled with dart2js 2.5.0 next we create a runoob-test.scss file, which reads:

runoob-test.scss file code:

/\* Define variables and values \*/ $bgcolor: lightblue; $textcolor: darkblue; $fontsize: 18px; /\* Use variables \*/ body { background-color: $bgcolor; color: $textcolor; font-size: $fontsize; } 

Then enter the following command on the command line, which is about .scss Css code for file conversion:

$ sass runoob-test.scss @charset "UTF-8"; /* Define variables and values */ /* Use variables */ body { background-color: lightblue; color: darkblue; font-size: 18px; } 

We can follow another one in the back. .css file name, save the code to the file:

$ sass runoob-test.scss runoob-test.css 

This will be generated in the current directory runoob-test.css file, the code is as follows:

@charset "UTF-8"; /* Define variables and values */ /* Use variables */ body { background-color: lightblue; color: darkblue; font-size: 18px; } /*# sourceMappingURL=runoob-test.css.map */ 
《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。