我应该使用(对于基于python的网站)? sass,compass,switchcss ... alternatives? [英] which should I use (for python-based sites)? sass, compass, switchcss...alternatives?

查看:96
本文介绍了我应该使用(对于基于python的网站)? sass,compass,switchcss ... alternatives?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是用来组织CSS的最好的系统?

What is the best system to use to organize your css?

我在几个网站上使用python作为后端脚本。我有兴趣使用东西来帮助我组织LONG CSS脚本。

I am making several websites where I use python for back-end scripts. I'm interested in using something to help me organize LONG css scripts.

我很好奇python / django开发人员使用的,并听说过switchcss。我已经看到朋友在过去使用sass / compass,但这似乎需要一个ruby解释器,这可能是好的建立网站,这样的方式,它不需要在服务器上的python和ruby解释器(或我的本地机器)。但是如果像sass这样的东西最终是最好的选择,安装ruby并不困难。

I'm curious about what python/django developers use, and have heard of switchcss. I've seen friends use sass/compass in the past, but this seems to require a ruby interpreter, and it might be good to build the sites in such a way that it would not require both python and ruby interpreters on the server (or my local machine). But if something like sass is definitively the best option, installing ruby is not difficult.

推荐答案

我几天前问自己同样的问题。经过广泛研究:

I was asking myself the same question a few days ago. After extensive research:

没有最佳系统来组织CSS

我没有太多的经验LESS虽然SASS对我更有意义。

I don't have much experience with LESS though SASS made more sense to me.

你不需要服务器上的Ruby SASS只是安装在您的计算机上,并将输出的css文件作为正常的css文件上传/同步到您的服务器。

You don't need Ruby on the server for SASS just install it on your computer and upload/sync the outputted css files to your server as a normal css file. (SASS can support huge websites, a normal(minified)static css file = less work on the server).

SASS网站提到SASS语法(SASS可以支持大型网站,正常(缩小)的静态css文件)比较新的SCSS语法更简洁。许多人会争辩,但缩进是美丽的,没有括号&没有分号以及导入作为+& mixins as =等。简单地创建SCSS语法以与LESS语法竞争。我试过两个和对我来说的SASS语法是更有趣,但这只是我的POV。

The SASS website mentions that "SASS" syntax is more concise than the newer "SCSS" syntax. Many will argue but the indents are beautiful, no brackets & no semicolons as well as import as + & mixins as = etc. The SCSS syntax was simply created to compete with the LESS syntax. I've tried both and "to me" the SASS syntax is way more fun but that's just my POV.

文本编辑器&它的设置你使用起到巨大的不同,当选择SASS& SCSS语法。如果你不知道如何通过一个快捷方式缩进2个空格,你可以花费整个时间将你的脸朝上SASS语法代码。 SCSS不会给你错误的缩进,不合适的地方,你可以像你需要的一样凌乱,(就像手css)真的下降到个人选择,虽然克里斯·埃普斯坦有意义,当思考个人&团队工作方便(在注释中):

The text editor & its settings you use plays a huge difference when choosing between SASS & the SCSS Syntax. If you don't know how to indent 2 spaces via a shortcut you may spend the entire time screwing your face up at the SASS syntax-ed code. SCSS won't give you errors for indenting out of place, you can be as messy as you need to be (just like hand css) really down to personal choice though Chris Eppstein made sense when thinking about personal & team work convenience (in comments):

http://thesassway.com/articles/sass-vs-scss-which-syntax-is-better

SCSS已填充快速,因为它现在是默认的,所以如果你要学习SASS语法,你可能会最终知道两个,因为所有的新资源都针对SCSS。 (BTW,你可以将SASS语法转换为SCSS,反之亦然)

SCSS has populated fast, as it's default now, so if you're going to learn the SASS syntax you will probably end up knowing both since all the new resources are directed at SCSS. (BTW you can convert SASS syntax to SCSS vice versa)

所以这就是偏好。尝试他们所有包括LESS。 (指南针非常好)

So it's down to preference. Try them all including LESS. (Compass is excellent)

这篇关于我应该使用(对于基于python的网站)? sass,compass,switchcss ... alternatives?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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