Open hayeah opened 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.
.preview
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:
.editor
.mdeditor
.mdeditor-preview
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).
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.
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:
.editor
to be.mdeditor
.preview
to be.mdeditor-preview
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).