Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't move Sass variables #51

Closed
wants to merge 3 commits into from
Closed

Conversation

aleclarson
Copy link

When using postcss-scss syntax, variables are parsed with the decl type, which causes variables to be reordered (which is undesirable).

@Siilwyn
Copy link
Owner

Siilwyn commented Jun 18, 2018

Hey again, thank you for your contribution! <3

Could you give some more context and explanation, like a 'before' and 'after' CSS code snippet that shows the unwanted behavior and why the variable needs a custom stringifier?

I'm surprised PostCSS doesn't mark declarations as variables, doesn't even differentiate for normal CSS variables like --bg-color: blue;. I think I would also like to add detection for that too but will get into that later.

Btw. this is new behavior so a test should be added, I can do that though. 👍

@Siilwyn Siilwyn mentioned this pull request Jun 28, 2018
@Siilwyn
Copy link
Owner

Siilwyn commented Jul 5, 2018

Small update, I'm planning on dropping support for Node 4 and shifting some things around for version 4. After that I'll pick up this PR for version 4.1! :)

@Siilwyn
Copy link
Owner

Siilwyn commented Aug 11, 2018

@aleclarson hey could you give an example of the unwanted behavior?

I'm thinking about it and with the current behavior the variables are moved to the top which is usually where you place variables as far as I know, but I feel like I'm missing some context.

@Siilwyn Siilwyn closed this Apr 14, 2020
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.

None yet

2 participants