You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree that we should generalize and normalize all the values that our options can have.
A agree that we can remove Boolean values (as confusing) and complex ones (we already have arrays and would have proper detection).
However, I'd save numeric ones, 'cause they always would be equal to the space repeated the given number of times.
Also, I find the arrays confusing now.
And after some thoughts I'd say we need to remove the Arrays and then split and rename some options (hello, #92, I guess I'll rewrite you again soon). The main thing we need to do is to rename the “space” options like this:
space-before-colon
space-after-color
space-around-combinator
space-before-curly-brace
space-after-curly-brace
etc…
Things that have multiple values inside (like combinator-space/space-around-combinator) should only be there when in most cases all the values inside them would be the same. Also, I'd prefer hashes instead of arrays if we'd need to set the before and after individually, so you could say "space-around-combinator": { "before": " ", "after": "\n\t" } for example. This way it would be better understandable.
While this kind of naming could seem too verbose, it would be:
More readable and less confusing. All the whitespace options could be started with space-, for example.
When the Detection of existent codestyle #87 would ship it won't matter much that the names are long: you could either write your options as CSS, you could generate the json from CSS, or just look up into the man to know which option to use.
Anyway, it won't be more confusing than now.
So, to sum up: all the options should be named in similar more understandable way and have only three possible types of values (two for most of them): String containing whitespaces, Number as \s{%Number%}, and Object for those options like combinator-space.
I propose removing Boolean values from all options dealing with whitespaces, because the only thing they do is that they confuse.
block-indent: true
means 4 spacescolon-space: true
means no space before:
and 1 space aftercombinator-space: true
means 1 space before and 1 space afterrule-indent: true
means 4 spacesstick-brace: true
means 1 space before{
Also I think that values like
colon-space: ' : '
should be removed in favour of arrays:colon-space: [' ', ' ']
.I also propose removing Number values, replacing
block-indent: 4
withblock-indent: ' '
.The text was updated successfully, but these errors were encountered: