在生产环境中为 less.js 保留 .css 后备真的很重要吗?
我正在研究 less.js,用于在客户端站点上进行开发和生产。它如何扩展 CSS 真是太神奇了,对我来说,使用它时速度并没有太大差异。
我想知道为 less.js 保留 .css 后备文件是否真的那么重要?我确信如果用户在没有启用 JavaScript 的情况下进行浏览,那么他们无论如何都无法浏览很多其他网站。你怎么认为?这真的重要吗?
有人说这不适合生产,但这是真的吗?
I am getting into less.js, for development and production on client sites. It's amazing how it can extend CSS, and for me there isn't really that much difference in speed when using it.
I'm wondering if it's really that important to keep a .css fallback file for less.js? I'm sure if a user is browsing without JavaScript enabled, then they wouldn't really be able to browse much other sites anyways. What do you think? Does it really matter?
Some say it's not mean't for production, but is that true?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果你使用 less 我建议你将 less 文件预编译成 CSS 文件。在客户端依赖 less 来解析 css 文件会引入另一个失败点。
在他们的网站 http://lesscss.org/ 上有很多如何执行此操作的示例。
如果您使用 .NET,您可以使用 T4 模板< /a> 或者您可以使用 DotLess 它使用 httphandler 在 Fly 服务器端编译 less 文件。
If your using less I suggest you precompile your less files into CSS files. Relying on less to parse your css files on the client side is introducing another point of failure.
On their website http://lesscss.org/ there are plenty of examples of how to do this.
If your using .NET you can use T4 Templates or you can use DotLess which uses an httphandler to compile the less file on the fly server side.