【文件属性】:
文件名称:b-e-m:BEM 的排版语法
文件大小:5KB
文件格式:ZIP
更新时间:2021-06-02 10:59:25
JavaScript
边界元法
BEM 的排版语法
基础教育手册
如果你还没有听说过它, 是根据CSS结构化方法大谈特谈。
/* Block component */
.article {}
/* Element that depends upon the block */
.article—header {}
/* Modifier that changes the style of the block */
.article--new {}
/* Modifier that changes the style of the element */
.article__header--large {}
BEM 对于人类和 grep 来说都是简单、可扩展且易于解析的。
不幸的是,它有一个主要缺陷,除非它没有得到解决,否则我们不可能在生产中使用这种有前途的技术。
双下划线让我喜欢
它只是看起来不那么好看。
【文件预览】:
b-e-m-master
----.travis.yml(37B)
----index.js(256B)
----package.json(687B)
----test()
--------test.js(426B)
----LICENSE(1KB)
----.gitignore(526B)
----README.md(3KB)
----.editorconfig(207B)