I read through this (this is a post from css-tricks.com), and this (this one is a comment to a post).
This is how my css looks:
.m0 { margin : 0%; } //m0 = Margin 0% <br>
.mla { margin-left : auto; } //mla = Margin Left Auto <br>
.mra { margin-right : auto; } //mra = Margin Right Auto
.w100px { width : 1000px; } //w1000px = Width 1000px
.h100 { height : 100%; } //h100 = Height 100%
etc..
I use my css only with classes, like this:
<html class="h100"> <!-- Height 100% -->,
<body class="m0 h100"> <!-- Margin 0%, Height 100% -->,
<div class="mla mra w1000px"> <!-- Margin-Left Auto, Margin-Right Auto, Width 1000px-->
etc...
If I want to create a red page using only the body my classes would look like this:
CSS
.m0 { margin : 0%; }
.bc08070 { background-color : hsl(0, 80%, 70%); }
//bgi = Background Color (hsl) 0 80% 70%
HTML
<body class="m0 bc08070"> <!-- Margin 0%, Background Color (hsl) 0 80% 70% -->
I write the class names in the order I wrote the css in: Margin (first), Width (next), Height (after that), Background Color (after that).
This way I don't rewrite any code and if I need to add a css attribute I can just add the appropriate class, I feel I have much better control this way.
Is this the best convention in css in terms of efficiency?
If it's not, please go into great depth on the best convention so that I understand what convention I'm using, and more importantly, why I'm using it.