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

go BEM ? #88

Open
Plou opened this issue Mar 4, 2016 · 3 comments
Open

go BEM ? #88

Plou opened this issue Mar 4, 2016 · 3 comments

Comments

@Plou
Copy link
Member

Plou commented Mar 4, 2016

I think we should go towards the BEM naming system

/* Plain CSS */
.article {
  font-size: 16px;
}

.article__title {
  font-size: 24px;
}

/* Using preprocessor */
.article {
  font-size: 16px;

  &__title {
    font-size: 24px;
  }
}
@Gregcop1
Copy link
Contributor

Gregcop1 commented Mar 4, 2016

Don't forget to mention a real example ;)

.news-item__header--active:hover { ... }

Without preprocessor, BEM is pain in the ass but with good preprocessor habits, I think it could be great

@Plou
Copy link
Member Author

Plou commented Mar 17, 2016

If the BEM is choosed, we'll have to look into scss-lint NestingDepth :

.list {
  &-item {
    &-link {
      &:hover { text-decoration: none; }
    }
  }
}

nesting depth is calculated as 4

.list-item-link:hover {
  text-decoration: none;
}

@Gregcop1
Copy link
Contributor

it's not a problem for them :)

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

No branches or pull requests

2 participants