Organize class in CSS file
During development a lot of times I need to apply just a small enhance开发者_Go百科ment to an html tag. For example : a red border ,or a float left.
The best practice dictate to keep all the code in one/several css files,avoid inline styling and keep ids to a minimum.
So how do I keep organize the css file with so many small groups of properties and how do I remember if I have one already or not. Should I just build a lot of small css classes ? How does this concept apply in a team ?
I have found comments to work best for my use. I usually break up my CSS document by page or display item such as
/* Contact Form */
or
/* About Us Table */
It really comes down to personal preference and coming to an agreement with your other team members on how to document your project.
精彩评论