+ 3
Organizing Properties in CSS
Is there any better way to organize CSS properties? Someone says should organize them by "Type". someone says should organize them by "Alphabetical order" and also someone says there is "no organizing order". Please let me know what is the best practice to organize CSS properties?
1 Answer
+ 1
I think the best way to organize css is with separated files, so you don't need to make all the style in only one css file (because you create a spaghetti code) . Let me I explain you a little better:
When you want to create a website first you create your html in this file you have a lot of things like a navbar, a header, a section for photos, other for news, a footer, and too many other things. All of this stuff is structured in the html and you can create one css file for each part, and when you want to link your html file with your styles you create a style file where you import every style of the page and Finally link it with your html file.
OK, but the the text below don't answer your question. In my opinion I think the best way to organize the properties is that all the properties are separated with spaces like groups, some for the box-model, other for the position and others for the style. But in general organize it in a way easy to read and that don't affect the expected result.
I hope this helpu