Skip to content

Conversation

@hudochenkov
Copy link
Owner

Related to #87

code: `
a {
height: 20px;
/* other props */
Copy link
Contributor

@njbraun njbraun Jul 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you suggesting this should pass with emptyLineBeforeUnspecified: 'always', set? I was under the impression this should fail. Anything that isn't a 'height' or 'width' css property should classify as "unspecified" and therefore should have an empty line before it w/ the above config.

That being said, if something isn't a standard css property (e.g. a comment, or the start of a new css selector block), that creates kind of a natural separation.

Let me know what you are thinking.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We ignore requirement if there is a comment before. Take a look at these tests for emptyLineBefore:

{
description: '7',
code: `
a {
display: none;
/* comment */
position: absolute;
}
`,
},

{
description: '9',
code: `
a {
/* comment */
display: none;
/* comment */
position: absolute;
}
`,
},

They are both accepted when emptyLineBefore: "always" is set for position.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Word “unspecified” in properties-order rule always mean properties which are not specified in a config.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for clarifying, I should have a PR up soon for this then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants