Skip to content

what should be the naming class for various font style and variant BEM #155

@zymr-keshav

Description

@zymr-keshav

I am reading this BEM and tried to apply in my project which using less and Bootstrap v3. I have tried to set class name for font setting in BEM but it doesn't look valid to me. something I am missing to understand.
here is the relevant less file

@OpenSans: "Open Sans";

.open-sans {
  font-family: @OpenSans;
}

.font-light {
  font-weight: 300;
}

.font-regular {
  font-weight: 400;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.font-normal {
  font-style: normal;
}

.font-italic {
  font-style: italic;
}

.font__normal--light {
  &:extend(.open-sans, .font-normal, .font-light);
}

.font__normal--regular {
  &:extend(.open-sans, .font-normal, .font-regular);
}

.font__normal--semibold {
  &:extend(.open-sans, .font-normal, .font-semibold);
}

.font__normal--bold {
  &:extend(.open-sans, .font-normal, .font-bold);
}

.font__italic--light {
  &:extend(.open-sans, .font-italic, .font-light);
}

.font__italic--regular {
  &:extend(.open-sans, .font-italic, .font-regular);
}

.font__italic--bold {
  &:extend(.open-sans, .font-italic, .font-bold);
}

.font__italic--semibold {
  &:extend(.open-sans, .font-italic, .font-semibold);
}

so my question is

what shoud be name

font__normal--bold or font__bold--normal or font__bold-normal ?

Please suggest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions