by teleclimber · 11y ago · 0 comments
I'm not putting this in my CSS just to satisfy some noble goal of "layout versus presentation":
li:nth-last-child(-n+6):first-child,
li:nth-last-child(-n+6):first-child ~ li {
/* properties here */
}
It's too cryptic. I feel another more important noble goal is to keep your CSS readable and understandable.Note that I'm not advocating blindly using "whatever has the nicest code", but in a lot of cases, a clean codebase is far better than 100% adherence to specs and guidelines. Write readable code first, optimize it later if you need to.
As for the ugliness of the CSS, well... that's what the CSS that works for the purpose looks like. Function over form. I'd recommend _adding a comment_ if you want developers to grok the code.
I must say I find it odd that you think transparency for fellow developers is _more_ important than the actual purpose of the code. Your convenience in maintaining the product cannot be more important than the product itself, surely?