CSS到SASS(或LESS)转换 [英] CSS to SASS (or LESS) conversion

查看:509
本文介绍了CSS到SASS(或LESS)转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以推荐一些css到更少,或css到sass转换工具?我找到了几个。 http://css2less.cc/ http:// css2sass .heroku.com / ,但任何洞察其可靠性(或其他工具的建议)将非常感谢。我有一个大的css代码库的白标签解决方案,这将有很大的好处有一个css预处理器,但是手动转换为sass / less一个巨大的任务。

Can anyone recommend some css to less, or css to sass conversion tools? I have found a few .e.g. http://css2less.cc/ and http://css2sass.heroku.com/ but any insight into their reliability (or recommendations of other tools) would be greatly appreciated. I have a large css codebase for a whitelabel solution which would benefit greatly from having a css preprocessor in place but it would be a huge task to manually convert to sass/less.

提前感谢

编辑:我应该强调,我特别感兴趣的使用工具的经验(如上面列出的那些(没有更好的工具) )将大型CSS代码库转换为使用css预处理器(如SASS或LESS)。或者,如果任何其他方式(除了列出的工具)来实现这样的壮举是务实的。你有什么障碍要克服?是否值得尝试?

I should emphasise I'm particularly interested in experiences of using a tool (such as those listed above (in the absence of any better ones)) to convert a large CSS codebase towards using a css preprocessor such as SASS or LESS. Or if any other ways (other than the tools listed) to achieve such a feat are pragmatic. What hurdles did you have to overcome? Is it even worth attempting? Or are such metalanguages only suited to a new project where you can start from scratch?

推荐答案

SASS的好处在于你可以从头开始。不需要将CSS转换为SASS,因为SASS是CSS的扩展。

The good thing about SASS is that you don't need to convert CSS into SASS, since SASS is an extension of CSS.

只需复制和粘贴即可。

如果你打算将你的CSS重构到结构良好的SASS文件,这是我不认为一个工具可以做的。

If you're looking to refactor your CSS into well structured SASS files though, thats something i don't think a tool can do.

这篇关于CSS到SASS(或LESS)转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆