【问题标题】:Bem naming underscore, hyphen or camelcase in element namesBem 在元素名称中命名下划线、连字符或驼峰式
【发布时间】:2018-04-05 05:59:03
【问题描述】:

我有一个名为“用户导航”的元素

目前我有

.header__user-nav

带修饰符

.header__user-nav--active

元素名称使用单下划线是否更好

  .header__user_nav--active

或连字符

  .header__user-nav--active

或驼峰

  .header__userNav--active

【问题讨论】:

    标签: css naming-conventions bem


    【解决方案1】:

    【讨论】:

    • 太好了,我会选择 .header__user-nav--active
    猜你喜欢
    • 2012-05-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-12-09
    • 2011-07-08
    • 2012-12-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多