Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css] 第155天 如何写高效的CSS? #1218

Open
haizhilin2013 opened this issue Sep 17, 2019 · 5 comments
Open

[css] 第155天 如何写高效的CSS? #1218

haizhilin2013 opened this issue Sep 17, 2019 · 5 comments
Labels
css css

Comments

@haizhilin2013
Copy link
Collaborator

第155天 如何写高效的CSS?

@haizhilin2013 haizhilin2013 added the css css label Sep 17, 2019
@AlenZhou233
Copy link

使用sass等预加载器,有嵌套,变量之类的。

@ChasLui
Copy link

ChasLui commented Sep 18, 2019

使用sass等预加载器,有嵌套,变量之类的。

你可能并不需要预处理器, css3 已经开始支持变量

@AlenZhou233
Copy link

是,请问还有什么更好的方法,我主要是喜欢可以写嵌套

@Guanrui1
Copy link

css大全,看下这篇文章吧,里面基本啥都有

@forever-z-133
Copy link

唔,自动补全、预编译这些辅助手段确实能提升一定的效率,
但我觉得真正能提升效率的是,不看预览就敢上手的理论知识。
见过太多加几行就要预览下效果的开发了,哪怕给他双屏其实也还是会拖慢节奏。

比如这个横排该怎么写,子级是否留隙/等宽/限宽,后期有其他元素加入怎么办,等等......
虽然有了 flex 后我们要考虑的少了很多,但依旧还是有布局规律可循。
这个过程很吃经验,类似于将样式/布局进行抽象理解,
等到能写出非常完善的抽象类也熟悉其优劣长短后,那不看预览也可以快速编写了。

另一方面,直接使用调试面板进行调试编写,也比改下保存下再看眼要快一些。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css css
Projects
None yet
Development

No branches or pull requests

5 participants