Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Sorting CSS parsing error #36

Closed
oxk4r01 opened this issue May 31, 2017 · 8 comments
Closed

Sorting CSS parsing error #36

oxk4r01 opened this issue May 31, 2017 · 8 comments

Comments

@oxk4r01
Copy link

oxk4r01 commented May 31, 2017

image
I got that error when choose SMACSS or concentric CSS.
Thanks in advance

@Siilwyn
Copy link
Owner

Siilwyn commented Jun 1, 2017

That's odd, could you try re-installing the package?

@oxk4r01
Copy link
Author

oxk4r01 commented Jun 1, 2017

Yes, but same results. Maybe the accent in the route could be the culprit?

@Siilwyn
Copy link
Owner

Siilwyn commented Jun 1, 2017

🤔 shouldn't be, could you check if the file and enclosing directories exist?

@oxk4r01
Copy link
Author

oxk4r01 commented Jun 8, 2017

I reinstalled and is solved. Don't know why it happened, but now it's everthing ok. BTW could it be possible in future releases add an option for sort selection, or for avoid the sorting of some selectors? I accustom to place comments above the @font-face selector, and the plugin sends them to the bottom...

@Siilwyn
Copy link
Owner

Siilwyn commented Jun 8, 2017

Sorting the selected code might be a good addition to the plugin. However it shouldn't move the comments like that in the first place, could you give example CSS input, output and expected output?

@oxk4r01
Copy link
Author

oxk4r01 commented Jun 9, 2017

image
image
That's after and before sorting. It happens with @font-face and maybe other selectors. At first I was wondering if it was related with the ascii characters, but it happens with regular comments too:
image

@Siilwyn
Copy link
Owner

Siilwyn commented Jun 10, 2017

I found the culprit and will push the fix soon. The first comment is not detected as a newline comment because it's the first line in the file, if you add an empty line before it it will work as expected. It shouldn't touch comments outside declarations at all.

@Siilwyn
Copy link
Owner

Siilwyn commented Jun 10, 2017

Siilwyn/css-declaration-sorter#37

@Siilwyn Siilwyn closed this as completed Jun 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants