组织 CSS 规则
我正在考虑更好地组织我的 CSS。一个建议是使用类似的东西 .LESS
我正在使用 ASP.NET,目前有一个 .LESS dotlesscss.com/" rel="nofollow noreferrer">.NET 的 Beta .LESS
好奇是否还有其他解决方案,例如 .LESS?
I'm thinking about organizing my CSS better. One suggestion is to use something like
.LESS
I'm using ASP.NET and there is currently a Beta .LESS for .NET
Curious if there are other solutions like .LESS?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
LESS 和 SASS 是“CSS 应该成为的语言”的两个主要竞争者;目前,只有 LESS 有 .NET 端口。
在将新组件集成到 Web 应用程序中之前,您可能需要问自己想要实现什么目标。您是否花费了比您想要的更多的时间来查找现有的 CSS 规则来更改它们?由于规则交互,您引入错误的速度是否与修复错误的速度一样快?这些问题的答案将帮助您决定您真正想要什么样的清理/重构/重组。另外,您应该考虑一些 CSS 问题是否来自您的标记;更简单、更合理的标记可能会大大有助于让你的 CSS 更容易理解。
LESS and SASS are the two major contenders for 'the language CSS should have been'; right now, only LESS has a .NET port.
Before you go and integrate a new component into your web application, you might want to ask yourself what you want to achieve. Are you spending more time than you'd like finding existing CSS rules to change them? Are you introducing bugs as fast as you fix them, because of rule interactions? The answers to those questions will help you decide what kind of cleanup/refactoring/reorganization you really want. Also, you should consider whether some of your CSS problems come from your markup; simpler, saner markup might go a long way toward making your CSS easier to understand.
组织 CSS 可能取决于您使用 HTML 或 XML 的情况。
Organizing your CSS may depend on weather you use HTML or XML.