dotless 与 less css 语言的语法完全相同吗?
.less 库称自己为 ruby LESS 库的端口。我是否可以得出这样的结论:它们都是相同 LESS 文件格式的编译器,或者它们是否期望有细微不同的 less 代码?以另一种方式问,我是否将自己锁定在 dotless 库中,或者可以在 less 文件上使用 dotless 和 less javascript 库?
The .less library calls itself a port of ruby LESS library. Can I take away from that that they both are compilers for the same LESS file format or do they expect subtly different less code? Asked another way, am I locking myself in to the dotless library or can use dotless and the less javascript lib on the less files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Dotlesscss 是 JavaScript 项目 less.js 的直接(几乎 1:1 移植)(LessCSS 的 JavaScript 实现,由 Cloudhead,LessCss for Ruby 的原作者)
在 99% 的情况下,在 dotlesscss 上运行的相同代码将在less.js 反之亦然。如果某些东西在 less.js 上运行但在 dotlesscss 上不起作用,我们会认为这是一个错误,并在可能的情况下尝试修复它。
但存在非常微妙的差异,因为很难保持三个不同的项目 100% 同步。
对于一个来说,这将是不同的函数名称。
例如,我们在 LessCss 项目之前实现的颜色操作函数,因为我们以它们的 SASS 等效项命名这些函数。
但总的来说:该语言是 100% 兼容的。
您不会将自己限制于一种语言。您应该能够相当轻松地在不同的实现之间移动。
dotless 也可以在 Mono 上运行,因此您也不会被锁定到特定的操作系统。
如果您遇到任何问题,请随时在我们的 GitHub 页面 上或通过邮件列表提出问题
Dotlesscss is a straight (almost 1:1 port) of the JavaScript project less.js (a JavaScript implementation of LessCSS by Cloudhead the original author of LessCss for Ruby)
In 99% of the cases the same code that runs on dotlesscss will run on less.js and vice versa. If something works on less.js and doesn't on dotlesscss we consider that a bug and try to fix it if possible.
There are very subtle differences though as it is very hard to keep three different projects 100% synced up.
For one that would be different function names.
Examples would be the color manipulation functions that we implemented before the LessCss project, as we named these after their SASS equivalents..
But in general: the language though is 100% compatible.
You are not limiting yourself to one language. You should be able to move between different implementations fairly easily.
Also dotless runs on Mono so you are not locked to a specific OS either.
If you encounter any problems feel free to raise an Issue on our GitHub Page or through the Mailing List
它们应该是等效的实现,但是
之间存在巨大差异。最大的区别在于,使用客户端实现,您将能够在 less 文件中使用浏览器的所有 dom,但这永远不会与服务器端实现一起使用:
此外,在当前版本的 dotless (1.2.4.0) 中,未实现 javascript 评估并呈现为css 输出中的
[script unsupported]
。They're supposed to be equivalent implemnentations however there is a hudge difference between
The big difference is that with the client side implementation, you'll be able to use all the dom of the browser in your less files and this would never work with server side implementations :
More over, in the current version of dotless (1.2.4.0), javascript evaluation is not implemented and is rendered as
[script unsupported]
in the css output.