We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
BEM其实是块(block)、元素(element)、修饰符(modifier)的缩写,利用不同的区块,功能以及样式来给元素命名。这三个部分使用__与--连接(这里用两个而不是一个是为了留下用于块儿的命名)。命名约定的模式如下:
.block {} .block__element {} .block--modifier {}
block
block__element
block--modifier
.block { @at-root #{&}__element {} @at-root #{&}--modifier {} }
/* 生成的CSS */ .block {} .block__element {} .block--modifier {}
参考资料:https://mrzhang123.github.io/2017/04/05/BEM/
The text was updated successfully, but these errors were encountered:
No branches or pull requests
BEM 命名规范
BEM其实是块(block)、元素(element)、修饰符(modifier)的缩写,利用不同的区块,功能以及样式来给元素命名。这三个部分使用__与--连接(这里用两个而不是一个是为了留下用于块儿的命名)。命名约定的模式如下:
block
代表了更高级别的抽象或组件block__element
代表block
的后代,用于形成一个完整的block
的整体block--modifier
代表block
的不同状态或不同版本参考资料:https://mrzhang123.github.io/2017/04/05/BEM/
The text was updated successfully, but these errors were encountered: