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

unconventional css class #14

Closed
ericraio opened this issue Mar 21, 2016 · 1 comment
Closed

unconventional css class #14

ericraio opened this issue Mar 21, 2016 · 1 comment

Comments

@ericraio
Copy link

the classes seem to be very weird, would you be open to changing them?

@jh3y
Copy link
Owner

jh3y commented Mar 22, 2016

Hi @ericraio ,

I think this leans towards opinionated. For me, they are conventional and intuitive. I don't believe them to be particularly unconventional.

The aim is to use BEM in combination with abbreviated words to keep the class attribute bloat to a minimum. It's ideal to keep doormat classes discreet as they are likely to be used along with other classes on a project.

  • dm is the abbreviation of doormat.
  • dm__pnl is the abbreviation of doormat__panel.

This is a common approach. Think of popular frameworks that instead of say;

<button class="button button--primary">I'm a button</button>

Actually use classes such as btn ;

<button class="btn btn--primary">I'm a button</button>

I have stripped it down further than that. Maybe drmt would conform better. The foundation idea is to strip vowels and repeated consonants.

That being said, If you wish to change the class names being used, there are some details in the README on how to "roll your own" custom version of doormat.

Hope that helps.

@jh3y

@jh3y jh3y closed this as completed Mar 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants