Issue
CSS properties use no spaces so why isn't the first space in the rule used as a separator between the property and the value?
Here's an example:
Solution
Why not remove the curly-braces as well and let indentation dictate the structure? That would be even cleaner.
However, sometimes better syntax is not about removing everything you can imagine, you often need to keep something to keep the syntax clear as well. A syntax that is more clear expresses the intention in a better way than a cleaner, more implicit syntax. It's harder to make mistakes with an explicit syntax, and easier to spot those mistakes.
In your two examples, I find the first one a lot easier to understand, because the key and the value are clearly, explicitly separated.
Answered By - Fredrik Mörk Answer Checked By - Robin (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.