良好的CSS对LESS [英] Well formed CSS to LESS

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

问题描述

作为UX设计师,我试图优化我的工作流程。
我想从HTML到良好的CSS到LESS尽可能快。
这个想法:发布你的HTML,生成CSS,编译TO更少,添加样式的属性,然后重新编译为CSS部署。

As a UX designer I am trying to optimize my work flow. I want to go from HTML to well formed CSS to LESS as quick as I can. The idea: Post your HTML, generate CSS, compile TO less, add the properties for style, and THEN recompile to CSS for deployment.

HTML:

<header>
   <nav>
     <ul>
       <li><a></a></li>
       <li><a></a></li>
       <li><a></a></li>
     </ul>
   </nav>
<header>

使用 http://lab.xms.pl/css-generator/

header {  }
header nav {  }
header nav ul {  }
header nav ul li {  }
header nav ul li a {  }

然后LESS版本是用某种编译器构建的(这是我需要的)

Then the LESS version is built with some kind of compiler (THIS IS WHAT I NEED)

header{
**declarations**
  nav{
  **declarations**
    ul{
    **declarations**        
      li{
      **declarations**
        a{
         **declarations**
         }
        }
       }
      }
     }

最后重新编译为正常的CSS当开发完成并准备部署一个工具,例如 http://wearekiss.com/simpless (只是一个例子,我相信有很多像这样的工具)

Finally recompile to normal CSS when development is finished and ready to deploy with a tool such as http://wearekiss.com/simpless (just an example I'm sure there are plenty of tools like this)

我意识到有些事情需要考虑,例如mixins vs使用Cleancss等工具连接规则,但嵌套是我最关注的重复特殊规则并再次是最可怕的建立/看。

I do realize there are things to consider such as mixins vs concatenating rules with tools like Cleancss but nesting is the biggest concern for me as repeating specificity rules over and over again is the most gruesome to build/look at.

要清除未使用的CSS,我们可以使用unused-css(dot)com或类似工具。

To clean out unused CSS we could use unused-css (dot) com or a similar tool.

有没有人有一个工具完成这样的任务?
任何人都有兴趣建立这个吗?

Does anyone have a tool for accomplishing such as task? Would anyone be interested in building this?

欢迎思考 - 建议 - meetups w / e。自动化只是这个任务至少可以真正地提高我们的水平到一个新的水平,所以请不要写如果关闭,仔细考虑我在建议之前大喊REWRITE ITTOUGH IT OUT等

Thoughts-suggestions-meetups w/e are welcome. Automating just this task at least could really lift alot of us to the next level, so please don't write if off, consider carefully what I'm suggesting before yelling "REWRITE IT" "TOUGH IT OUT" etc

提前感谢并希望听到一些好的输入。

Thanks in advance and hope to hear some good input.

推荐答案

PHP实现LESS预处理器有一个名为Lessify的工具。您可以从项目的git repo 让它上网。我希望这是你需要的。

The PHP implementation of the LESS preprocessor has a tool called Lessify. You can download it from the project's git repo or give it a go online. I hope this is what you needed.

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

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