sass css选择器,sass: Sass 扩展了 CSS3,增加了规则、变量、混入、选择器、继承等等特性...

logo.svg

SassCSS?label=%40SassCSS&style=social

sass?label=Sass%20questions&logo=stackoverflow&style=social

sass?label=chat&logo=gitter&style=social

Sass makes CSS fun again. Sass is an extension of CSS, adding nested rules,

variables, mixins, selector inheritance, and more. It's translated to

well-formatted, standard CSS using the command line tool or a plugin for your

build system.

$font-stack: Helvetica, sans-serif;

$primary-color: #333;

body {

font: 100% $font-stack;

color: $primary-color;

}

@mixin border-radius($radius) {

-webkit-border-radius: $radius;

-moz-border-radius: $radius;

-ms-border-radius: $radius;

border-radius: $radius;

}

nav {

ul {

margin: 0;

padding: 0;

list-style: none;

}

li { @include border-radius(10px); }

a {

display: block;

padding: 6px 12px;

text-decoration: none;

}

}

Install Sass

You can install Sass on Windows, Mac, or Linux by downloading the package for

your operating system from GitHub and adding it to your PATH.

That's all—there are no external dependencies and nothing else you need to

install.

If you use Node.js, you can also install Sass using npm by running

npm install -g sass

However, please note that this will install the pure JavaScript

implementation of Sass, which runs somewhat slower than the other options listed

here. But it has the same interface, so it'll be easy to swap in another

implementation later if you need a bit more speed!

See the Sass website for more ways to install

Sass.

Once you have Sass installed, you can run the sass executable to compile

.sass and .scss files to .css files. For example:

sass source/stylesheets/index.scss build/stylesheets/index.css

Learn Sass

Check out the Sass website for a guide on how to

learn Sass!

This Repository

This repository isn't an implementation of Sass. Those live in

sass/dart-sass and sass/libsass. Instead, it contains:

spec/, which contains specifications for language features.

proposal/, which contains in-progress proposals for changes to the

language.

accepted/, which contains proposals that have been accepted and are

either implemented or in the process of being implemented.

Note that this doesn't contain a full specification of Sass. Instead, feature

specifications are written as needed when a new feature is being designed or

when an implementor needs additional clarity about how something is supposed to

work. This means many of the specs in spec/ only cover small portions of the

features in question.

Versioning Policy

The proposals in this repository are versioned, to make it easy to track changes

over time and to refer to older versions. Every version has a Git tag of the

form proposal..draft-. A new version should be created for each

batch of changes.

Every version has a major version, and they may have a minor version as well

(indicated .). The minor version should be incremented for

changes that don't affect the intended semantics of the proposal; otherwise, the

major version should be incremented.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值