hayeah / fork2-rails

fork2 rails web app
MIT License
1 stars 0 forks source link

better css naming for checkin style #2

Open hayeah opened 10 years ago

hayeah commented 10 years ago

The class names you use now can very easily conflict with other rules.

.preview, for example, is too generic, and might be used in other places.

To learn how to architect css better, read scalable and modular css architecture. It's a short book, please read it.

Pay attention particularly to these 2 chapters:

You could create a "css module" for the markdown editor.

The changes I'd make:

The book explains why this naming pattern is good. (Also, you might also look at bootstrap to see what class names they give to components).

cj1128 commented 10 years ago

OK.I will read the book seriously.When I looked this title,I knew where I am wrong.I knew I should use more specific class and id names,but I just forgot it .Forgive me ,I don't have much experience.