Sass之初识
Sass is the most mature, stable, and powerful professional grade CSS extension language in the world.
SASS是最成熟的,稳定的,和在世界上强大的专业级的CSS扩展语言。
Sass Compatible
Sass的兼容性
Sass is completely compatible with all versions of CSS. We take this compatibility seriously, so that you can seamlessly use any available CSS libraries.
SASS是完全兼容所有版本的CSS。我们控制好这种兼容性,这样就可以无缝地使用任何可用的CSS库。
With either language, you can write your own mixins to help with vendor prefixes. No winner there. But you know how you don't go back and update the prefixes you use on all your projects? (You don't.) You also won't update your handcrafted mixins file. (Probably.)
无论是语言,你可以写你自己的混合来帮助供应商的前缀。没有赢家。但你知道你不去更新你使用你所有的项目的前缀?(你不知道)你也不会更新你的手工混合文件。(可能)。
In Sass, you can use Compass, and Compass will keep itself updated, and thus the prefix situation is handled for you. Bourbon is also good. There will be some back and forth on which of these project is "ahead."
在Sass中,你可以使用指南针,指南针会保持更新,因此前缀情况为你处理。波旁王朝也不错。将有一些来回的这些项目是“领先”。
In LESS, there are also some mixin libraries battling to be the best. They are looking a lot better these days than they have in the past. Despite their marketing-y support charts, I don't think they are quite as robust as the Sass versions. I've been led to understand in the past that the language of LESS itself doesn't make it possible to build as robust of libraries on top of it. We'll get to some of that next.
不,也有一些混合图书馆努力成为最好的。这些天他们看起来比过去好多了。尽管他们的marketing-y支持图表,我不认为他们是很强大的放大版本。我一直在过去的理解,少本身的语言,并不能使它成为强大的库顶部的它。我们会得到一些下一个。
In both cases, the onus is on you to keep the preprocessor software itself up to date as well as these libraries. I also find that easier in Sass in general. For instance, Compass updates will just come automatically in CodeKit, or you use a Gem which is easy to update, while LESS mixins you'll have to manually update a file yourself.
在这两种情况下,你有责任保持前处理软件本身目前以及这些库。我还发现,容易在SASS一般。例如,指南针会自动更新来CodeKit,或者你用宝石易于更新,而不混入你必须手动更新文件自己。
LESS has an ability to do "guarded mixins." These are mixins that only take affect when a certain condition is true. Perhaps you want to set a background color based on the current text color in a module. If the text color is "pretty light" you'll probably want a dark background. If it's "pretty dark" you'll want a light background. So you have a single mixin broke into two parts with these guards that ensure that only one of them takes effect.
少有能力做“守卫混入。”这些都是混合的只考虑影响某个条件为真时。也许您想在模块中设置基于当前文本颜色的背景颜色。如果文本的颜色是“漂亮的光”,你可能会想要一个黑暗的背景。如果它是“非常黑暗”,你会想要一个光背景。所以你有一个单一的混合折成两部分这些警卫,确保只有一个生效。
Sass之初识的更多相关文章
- Sass:初识Sass与Koala工具的使用
一.下载Koala(找到合适的系统版本)并安装 二.先新建一个css文件夹,并在里面新建一个文本文档(.txt),将其命名为demo.scss 三.打开Koala,将css文件夹拽进来,可以修改一下输 ...
- 初识sass框架
编写过页面的开发者都知道css这个东西,究其原意,也就是层叠样式表,我们页面的三大结构,html css javascript,其中html负责主要的页面结构,css就负责主要的页面样式,而我们的js ...
- 初识css预处理器:Sass、LESS
这篇文章是初步介绍css预处理的,详细学习请移步官网~ 什么是css预处理器 CSS 预处理器是一种语言, 通俗易懂的话来说就是“用一种专门的编程语言,进行 Web 页面样式编写,再通过编译器转化为正 ...
- 初识sass
大图:http://images2015.cnblogs.com/blog/730765/201605/730765-20160529113743209-72994369.png
- sass(scss)10大常用重要特性
用sass用了好久,期初看中的是他的嵌套功能,因为刚开始的时候是用jquery,电脑安装Ruby,全局安装sass,将scss编译为css,不得不说真的很方面,节点套节点,和html的很类似.但是后来 ...
- wepack+sass+vue 入门教程(三)
十一.安装sass文件转换为css需要的相关依赖包 npm install --save-dev sass-loader style-loader css-loader loader的作用是辅助web ...
- wepack+sass+vue 入门教程(二)
六.新建webpack配置文件 webpack.config.js 文件整体框架内容如下,后续会详细说明每个配置项的配置 webpack.config.js直接放在项目demo目录下 module.e ...
- wepack+sass+vue 入门教程(一)
一.安装node.js node.js是基础,必须先安装.而且最新版的node.js,已经集成了npm. 下载地址 node安装,一路按默认即可. 二.全局安装webpack npm install ...
- 前端CSS预处理器Sass
前面的话 "CSS预处理器"(css preprocessor)的基本思想是,用一种专门的编程语言,进行网页样式设计,然后再编译成正常的CSS文件.SASS是一种CSS的开发工 ...
随机推荐
- C++中C/C++格式化输出
对于不同的机器,一此格式化输出的函数经常会得不到正确的输出,比方小端上的程序在大端上执行等,另外,在日常程序开发时,也会经常被这种小问题而困扰非常久.终于发现是她的问题.不免有点叹息,以下对print ...
- NAT后面的FTP SERVER终极篇
原文引用:http://blog.chinaunix.net/uid-20592805-id-1918661.html 如果对于被动模式还有不同的意见,我们可以再看下这篇文章: http://ww ...
- 线性回归(linear regression)之监督学习
假设有以下面积和房屋价格的数据集: 可以在坐标中画出数据的情况: 就是基于这样一个数据集,假定给出一个房屋的面积,如何预测出它的价格?很显然就是我们只需建立一个关于房屋面积的函数,输出就是房屋的价格. ...
- android百度地图开发之自动定位所在位置与固定位置进行驾车,步行,公交路线搜索
最近跟着百度地图API学地图开发,先是学了路径搜索,对于已知坐标的两点进行驾车.公交.步行三种路径的搜索(公交路径运行没效果,待学习中),后来又 学了定位功能,能够获取到自己所在位置的经纬度,但当将两 ...
- android中判断sim卡状态和读取联系人资料的方法
在写程序中,有时候可能需要获取sim卡中的一些联系人资料.在获取sim卡联系人前,我们一般会先判断sim卡状态,找到sim卡后再获取它的资料,如下代码我们可以读取sim卡中的联系人的一些信息. Pho ...
- JavaScript宝座:七大框架论剑
JavaScript宝座:七大框架论剑 一周前,Throne of JS大会在多伦多召开,这应该是我参加过的最有料也最不一样的一次大会.大会官网如是说: 加载整个页面,然后再“渐进增强”以添加动态行为 ...
- 关于对defer的理解.
代码 <script defer> function init(){ document.getElementById("div").innerHTML="OK ...
- BinaryWriter和BinaryReader用法
C#的FileStream类提供了最原始的字节级上的文件读写功能,但我们习惯于对字符串操作,于是StreamWriter和 StreamReader类增强了FileStream,它让我们在字符串级 ...
- ajax重写,js方法重新
重写Jquery的$.ajax方法 (function($){ //备份jquery的ajax方法 var _ajax=$.ajax; //重写jquery的ajax方法 $.ajax=functio ...
- QQ群信息统计
接口一: 1:QQ群信息统计 地址:http://localhost:8080/webServices/messageSort 注意:连接地址提交的是一个txt文件,返回是一个list的json字符串 ...