m2是什么意思| 吕洞宾属什么生肖| 两个a是什么牌子| 玫瑰代表什么| 甘的部首是什么| 蒸米饭时加什么好吃| 什么解酒最快| 置换补贴什么意思| 尿素氮高什么原因| 成人用品是什么| 紫癜是什么引起的| 九月十三号是什么星座| 做梦手机坏了什么预兆| 爸爸生日送什么礼物| 月经不来什么原因| 8月25号是什么日子| pussy是什么意思| 脑梗做什么检查| 8月24是什么星座| 血小板低是什么问题| 葫芦藓是什么植物| 七杀大运是什么意思| 降息是什么意思| 丁五行属什么| 羊肉不放什么调料| 经常头疼什么原因| 小孩子睡觉磨牙是什么原因| 九月初八是什么星座| 菠菜和豆腐为什么不能一起吃| 什么是微创手术| 腕管综合症吃什么药| 佛历是什么意思| 看眼睛挂什么科| 男属鼠的和什么属相最配| 红豆是什么意思| 脚气用什么药膏最好| 发烧想吐是什么原因| 降血糖喝什么茶好| 吃什么保护眼睛| 老好人是什么意思| 什么的飞翔| 葡萄球菌用什么抗生素| 冶游史是什么意思| 朱砂有什么作用与功效| 青海有什么好玩的| 公历是什么| 老马识途是什么意思| 感冒头疼吃什么药好| 御守是什么| 什么是一桌餐| 最贵的榴莲是什么品种| 23数字代表什么意思| 造影检查对身体有什么伤害| 保鲜袋什么材质好| 复方什么意思| 海子为什么自杀| 心力衰竭吃什么药最好| 中国发明了什么| 女人外阴瘙痒用什么药| 什么是呼吸性碱中毒| 当驾校教练需要什么条件| 喝茶叶茶有什么好处| 干细胞移植是什么意思| 月经一直不干净吃什么药| 忘恩负义的负是什么意思| 36岁属什么生肖| 糟卤是什么| 不字五行属什么| 急性肠胃炎打什么点滴| 十八罗汉分别叫什么| 猫咪飞机耳是什么意思| 桂味是什么| 粉色代表什么| 女人梦见蛇缠身是什么预兆| 东面墙适合挂什么画| 什么方法可以治打嗝| 幽门螺杆菌是什么意思| 打卤面都有什么卤| 917是什么意思| 尿道炎有什么症状| 乙肝表面抗体阴性什么意思| 福相是什么意思| 食字五行属什么| 抽烟有什么好处| 吩咐是什么意思| 6月12是什么星座| suki是什么意思| 蓝眼泪是什么意思| 章鱼吃什么| 蜂蜜对人体有什么好处和功效| 10015是什么电话| 口干舌燥是什么病| 都有什么血型| 肌电图是检查什么的| 没有胎心胎芽是什么原因造成的| 芪明颗粒主治什么病| 心脏供血不足是什么原因引起的| 足字旁的字有什么| 葡萄糖是什么糖| 1995是什么年| 白细胞偏低是什么原因造成的| 女生腰疼是什么原因| 为什么明星整牙那么快| 为什么女人阴唇会变大| 三羊开泰什么意思| 鸡头米是什么| 独立户口需要什么条件办理| 肠炎吃什么药| 6月13日是什么星座| 腊八粥是什么节日| 世界上最多的动物是什么| 10月5号是什么星座| 精湛是什么意思| 心电图p是什么意思| dha有什么作用与功效| 为难是什么意思| 去痛片又叫什么名| 情商什么意思| 蝙蝠是什么动物| 烧伤的疤痕怎么去除用什么法最好| 什么是胰腺癌| 水泊梁山什么意思| 小孩子为什么会得抽动症| 肾结石是什么症状| 什么叫造影| 膝关节置换后最怕什么| 肾精亏虚吃什么中成药| 十天干代表什么| 男性脾大是什么原因| mpa是什么意思呀| 屈服是什么意思| 狮子座上升星座是什么| 半夜呕吐是什么原因| 承上启下是什么意思| 气虚是什么意思| 大黄鸭是什么牌子| 工厂体检一般检查什么| 白完念什么| 日新月异什么意思| 盖碗适合泡什么茶| 时光荏苒岁月如梭是什么意思| 此言差矣是什么意思| 拉肚子拉水吃什么药| 孤寡老人国家有什么政策| 胰腺炎有什么症状| 副营级是什么军衔| 急性肾炎什么症状| 看脖子挂什么科| 头孢是什么药| 无头鱼是什么鱼| 这个人就是娘是什么歌| 丁香花长什么样| 怀孕后不能吃什么| 八月六号是什么星座| 什么的红烧肉| 火靠念什么| 与虎谋皮是什么生肖| 打一个喷嚏代表什么意思| 化胡为佛是什么意思| 幻听是什么原因引起的| 印度是什么人种| 漂头发是什么意思| 尿频是什么病| 梦见系鞋带是什么意思| 3月19日什么星座| 背痛挂什么科| 夜明砂是什么| 吃什么对心脏好改善供血不足| 执行标准是什么意思| 张学友和张家辉什么关系| 2011年是什么生肖| 什么效应| 石榴木命是什么意思| 左胸隐痛什么原因| 三班两倒是什么意思| 十月是什么月| 左肺下叶钙化灶是什么意思| 血脂高吃什么水果| 梦见手机坏了是什么意思| 喊麦什么意思| 尿血是什么病的征兆| 带教是什么意思| 脉搏跳得快是什么原因| 阑尾炎吃什么| 胡萝卜炒什么好吃| 床虱咬了要擦什么药膏| 蒲公英有什么作用和功效| 大姨妈期间可以吃什么水果| 室性期前收缩是什么意思| 语什么心什么| 启攒是什么意思| 和合双全是什么生肖| 发烧拉肚子是什么原因| 干咳有痰是什么原因| 红楼梦是什么朝代| 卵巢囊肿术后吃什么食物好| 普拉提是什么意思| 大姨妈来能吃什么水果| 体检需要带什么| 矿泉水敷脸有什么作用| 纳差是什么症状| 螃蟹代表什么生肖| 小孩嗓子哑了吃什么药| 夜深人静是什么意思| 翔是什么意思| 梦见吃药是什么意思| 什么肉不能吃| 老是犯困是什么原因| 朋友是什么| 男人身体虚吃什么补| lsil是什么意思| 左心室强光点是什么意思| 什么叫佛系| 2月3号是什么星座| 痛经是什么| 蚯蚓中药叫什么| 鸟在电线上为什么不会触电| 吃三七粉有什么功效| 风热感冒吃什么食物| 车迟国的三个妖怪分别是什么| 透明的什么填词语| 便秘吃什么能马上排便| ivory是什么意思| 嗓子疼流鼻涕吃什么药| 什么是软组织损伤| 胆固醇偏高是什么意思| 宝宝爱出汗是什么原因| 1994年是什么命| 三级手术是什么意思| 健脾吃什么食物| o型血为什么叫贵族血| 西洋参有什么功效和作用| 钟点房是什么意思| 擒贼先擒王是什么生肖| 立秋当天吃什么| 速战速决的意思是什么| 四点底和什么有关| 人为什么会低血糖| 双是什么意思| 什么的照射| 512是什么节日| 橡胶过敏是什么症状| 男人勃不起是什么原因造成的| 足跟痛用什么药| 甲状腺结节什么症状| 细胞学说揭示了什么| 开胃菜都有什么| 四大是什么| 血稠是什么原因造成的| 喝什么饮料解酒| 1999年出生的属什么| 朝鲜和韩国是什么关系| 电离辐射是指什么| 什么是鸡冠油| 颈椎反曲是什么意思| 消症是什么意思| 处女座女和什么星座最配| 山竹什么味道| 低密度脂蛋白胆固醇偏低是什么意思| 梦到和男朋友分手是什么征兆| 桂圆是什么| iron什么意思| 程度是什么意思| 向日葵代表什么生肖| 百度

网络电视直播软件哪个好 电视直播软件排行2017

(Redirected from Less (stylesheet language))
百度   新乡市委书记舒庆表示,互称“同志”是回归党的优良传统,新乡正以此为突破口,带动、实施一系列举措,推进作风建设。

Less (Leaner Style Sheets; sometimes stylized as LESS) is a dynamic preprocessor style sheet language that can be compiled into Cascading Style Sheets (CSS) and run on the client side or server side.[2] Designed by Alexis Sellier, Less is influenced by Sass and has influenced the newer "SCSS" syntax of Sass, which adapted its CSS-like block formatting syntax.[3] Less is an open source project. Its first version was written in Ruby; however, in the later versions, use of Ruby has been deprecated and replaced by JavaScript. The indented syntax of Less is a nested metalanguage, as valid CSS is valid Less code with the same semantics. Less provides the following mechanisms: variables, nesting, mixins, operators and functions; the main difference between Less and other CSS precompilers is that Less allows real-time compilation via less.js by the browser.[2][4]

Less
Designed byAlexis Sellier
DeveloperAlexis Sellier, Dmitry Fadeyev
First appeared2009; 16 years ago (2009)
Stable release
4.4.0[1] Edit this on Wikidata / 16 July 2025; 16 days ago (16 July 2025)
Typing disciplineDynamic
Implementation languageJavaScript
OSCross-platform
LicenseApache License 2.0
Filename extensions.less
Websitelesscss.org
Influenced by
CSS, Sass
Influenced
Sass, Less Framework, Bootstrap (v3)

Features

edit

Variables

edit

Less allows variables to be defined. Variables in Less are defined with an at sign (@). Variable assignment is done with a colon (:).

During translation, the values of the variables are inserted into the output CSS document.[2]

@pale-green-color: #4D926F;

#header {
  color: @pale-green-color;
}
h2 {
  color: @pale-green-color;
}

The code above in Less would compile to the following CSS code.

#header {
  color: #4D926F;
}
h2 {
  color: #4D926F;
}

Mixins

edit

Mixins allows embedding all the properties of a class into another class by including the class name as one of its property, thus behaving as a sort of constant or variable. They can also behave like functions, and take arguments. CSS does not support Mixins: Any repeated code must be repeated in each location. Mixins allows for more efficient and clean code repetitions, as well as easier alteration of code.[2]

.rounded-corners (@radius: 5px 10px 8px 2px) {
  -webkit-border-radius: @radius;
  -moz-border-radius: @radius;
  border-radius: @radius;
}

#header {
  .rounded-corners;
}
#footer {
  .rounded-corners(10px 25px 35px 0px);
}

The above code in Less would compile to the following CSS code:

#header {
  -webkit-border-radius: 5px 10px 8px 2px;
  -moz-border-radius: 5px 10px 8px 2px;
  border-radius: 5px 10px 8px 2px;
}
#footer {
  -webkit-border-radius: 10px 25px 35px 0px;
  -moz-border-radius: 10px 25px 35px 0px;
  border-radius: 10px 25px 35px 0px;
}

Less has a special type of ruleset called parametric mixins which can be mixed in like classes, but accepts parameters.

#header {
  h1 {
    font-size: 26px;
    font-weight: bold;
  }
  p {
    font-size: 16px;
    a {
      text-decoration: none;
      color: red;
      &:hover {
        border-width: 1px;
        color: #fff;
      }
    }
  }
}

The above code in Less would compile to the following CSS code:

#header h1 {
  font-size: 26px;
  font-weight: bold;
}
#header p {
  font-size: 16px;
}
#header p a {
  text-decoration: none;
  color: red;
}
#header p a:hover {
  border-width: 1px;
  color: #fff;
}

Functions and operations

edit

Less allows operations and functions. Operations allow addition, subtraction, division and multiplication of property values and colors, which can be used to create complex relationships between properties. Functions map one-to-one with JavaScript code, allowing manipulation of values.

@the-border: 1px;
@base-color: #111;
@red:        #842210;

#header {
  color: @base-color * 3;
  border-left: @the-border;
  border-right: @the-border * 3;
}
#footer {
  color: @base-color + #003300;
  border-color: desaturate(@red, 10%);
}

The above code in Less would compile to the following CSS code:

#header {
  color: #333;
  border-left: 1px;
  border-right: 3px;
}
#footer {
  color: #114411;
  border-color: #7d2717;
}

Comparison

edit

Sass

edit

Both Sass and Less are CSS preprocessors, which allow writing clean CSS in a programming construct instead of static rules.[5]

Less is inspired by Sass.[6][3] Sass was designed to both simplify and extend CSS, so things like curly braces were removed from the syntax. Less was designed to be as close to CSS as possible, and as a result existing CSS can be used as valid Less code.[7]

The newer versions of Sass also introduced a CSS-like syntax called SCSS (Sassy CSS).

Use on sites

edit

Less can be applied to sites in a number of ways. One option is to include the less.js JavaScript file to convert the code on-the-fly. The browser then renders the output CSS. Another option is to render the Less code into pure CSS and upload the CSS to a site. With this option no .less files are uploaded and the site does not need the less.js JavaScript converter.

Less software

edit
Name Description Software License Platform Functionality
WinLess - Windows GUI for less.js GUI Less Compiler Apache 2.0[8] Windows Compiler
Crunch Less editor and compiler (requires Adobe AIR) GPL[9] Windows, Mac OS X Compiler
Editor
less.js-windows Simple command-line utility for Windows that will compile *.less files to CSS using less.js. MIT License[10] Windows Compiler
less.app Less Compiler Proprietary Mac OS X Compiler
CodeKit Less Compiler Proprietary Mac OS X Compiler
LessEngine Less Compiler Free OpenCart Plugin Compiler
SimpLESS Less Compiler free but no explicit license[11] Windows
Mac OS X
Linux
Compiler
Chirpy Less Compiler Ms-PL[12] Visual Studio Plugin Compiler
Mindscape Web Workbench Syntax highlighting and IntelliSense for Less and Sass Proprietary Visual Studio Plugin Compiler
Syntax Highlighting
Eclipse Plugin for Less Eclipse Plugin EPL 1.0[13] Eclipse Plugin Syntax highlighting
Content assist
Compiler
mod_less Apache2 module to compile Less on the fly Open Source Linux Compiler
grunt-contrib-less Node.js Grunt task to convert Less to CSS MIT[14] Node.js Compiler
Web Essentials Visual Studio extension with support for Less and Sass Apache 2.0 [15] Windows Syntax highlighting, Content assist, Compiler
clessc Pure C++ compiler MIT[16] at least Windows, Linux, MacOS Compiler
Less WebCompiler Web-based compiler MIT[17] at least Windows, Linux, MacOS Compiler, Syntax highlighting, Minifier

See also

edit

References

edit
  1. ^ "Release 4.4.0". 16 July 2025. Retrieved 22 July 2025.
  2. ^ a b c d The Core Less Team. "Getting started | Less.js". Less.js. Retrieved 2025-08-07.
  3. ^ a b Weizenbaum, Nathan (2025-08-07). "Sass and Less : Nex3". Archived from the original on 2025-08-07. Retrieved 2025-08-07.
  4. ^ Meng, Jiew (2025-08-07). Mortensen, Peter (ed.). "css - Is there a SASS.js? Something like LESS.js?". Stack Overflow. Retrieved 2025-08-07.
  5. ^ Atwood, Jeff (2025-08-07). "What's Wrong With CSS". Coding Horror. Retrieved 2025-08-07.
  6. ^ The Core Less Team. "About | Less.js". Less.js. Retrieved 2025-08-07.
  7. ^ Eppstein, Chris (2025-08-07). "sass_and_less_compared.markdown". GitHub Gist. Retrieved 2025-08-07.
  8. ^ Lagendijk, Mark (2025-08-07). "License Information · Issue #55 · marklagendijk/WinLess". GitHub. Retrieved 2025-08-07.
  9. ^ Dean, Matthew (2025-08-07). "Crunch/LICENSE.txt at master · matthew-dean/Crunch". GitHub. Retrieved 2025-08-07.
  10. ^ Smart, Duncan (2025-08-07). "less.js-windows/LICENSE at master · duncansmart/less.js-windows". GitHub. Retrieved 2025-08-07.
  11. ^ Engel, Christian (2025-08-07). "SimpLESS/LICENSE.txt at master · Paratron/SimpLESS". GitHub. Retrieved 2025-08-07.
  12. ^ Evan Nagle. "Chirpy - VS Add In For Handling Js, Css, DotLess, and T4 Files - CodePlex Archive". CodePlex. Archived from the original on 2025-08-07. Retrieved 2025-08-07.
  13. ^ Vincent Simonet. "Eclipse plugin for LESS". normalesup.org. Retrieved 2025-08-07.
  14. ^ Kellen, Tyler (2025-08-07). "grunt-contrib-less/LICENSE-MIT at master · gruntjs/grunt-contrib-less". GitHub. Retrieved 2025-08-07.
  15. ^ Kristensen, Mads (2025-08-07). "WebEssentials2013/LICENSE.txt at master · madskristensen/WebEssentials2013". GitHub. Retrieved 2025-08-07.
  16. ^ Bram van der Kroef (2025-08-07). "clessc/LICENSE at master · BramvdKroef/clessc". GitHub. Retrieved 2025-08-07.
  17. ^ SamBrishes (2025-08-07). "snout.less/LICENSE.md at master · pytesNET/snout.less". GitHub. Retrieved 2025-08-07.
edit
消纳是什么意思 尿道口发痒是什么原因 什么是直肠炎 什么地回答 泌乳素是什么意思
另煎兑服是什么意思 左侧卵巢显示不清是什么意思 表面抗原阳性是什么意思 口腔疱疹吃什么药 军绿色是什么颜色
治疗呼吸道感染用什么药最好 中指麻木是什么原因引起的 什么姿势最舒服 唐氏综合症是什么意思 看输卵管是否堵塞做什么检查
诅咒是什么意思 腰酸是什么原因女性 过期蜂蜜还有什么用途 人乳头瘤病毒是什么意思 中暑喝什么水
国画是什么hcv8jop0ns0r.cn 舌头烧灼感是什么原因hcv8jop5ns9r.cn 烟嗓是什么意思hcv9jop4ns6r.cn 手脱皮用什么药膏最好hcv8jop4ns8r.cn 非处方药是什么意思hcv8jop8ns0r.cn
皮肤瘙痒是什么病的前兆xinjiangjialails.com 发晕是什么原因引起的hcv8jop0ns3r.cn 什么星座最疼射手座hcv9jop6ns8r.cn 槟榔是什么味道hcv9jop2ns9r.cn 至是什么意思hcv9jop0ns0r.cn
女人腰疼是什么原因引起的kuyehao.com 狗头是什么意思hcv8jop1ns6r.cn 女人梦见火是什么预兆hcv9jop0ns0r.cn 打嗝是什么病的前兆bysq.com 茴三硫片主治什么hcv8jop7ns1r.cn
什么办法退烧快hcv9jop5ns5r.cn 十月十二号是什么星座hcv7jop5ns4r.cn 姨太太是什么意思bfb118.com 尿液阳性是什么意思hcv9jop7ns1r.cn 无缘无故头疼是什么原因hcv8jop3ns8r.cn
百度