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

Inconsistently removed colons (another edge case) #85

Open
qnp opened this issue Feb 5, 2021 · 4 comments · May be fixed by #86
Open

Inconsistently removed colons (another edge case) #85

qnp opened this issue Feb 5, 2021 · 4 comments · May be fixed by #86

Comments

@qnp
Copy link

qnp commented Feb 5, 2021

Hello,

I open another issue, related to #79 and the subsequent commit 0734bec. This commit cover properly the case of direct variable access:

color: $ui.colors.blue

However, when performing operations on such retrieved variables using built-in or custom functions (or even CSS functions such as linear-gradient), like for instance:

color: darken($ui.colors.blue, 50%) // built-in function
background-color: linear-gradient(90deg, red 0%, $ui.colors.blue 100%) // CSS function compiled as is

stylus-supremacy will again remove the colon : causing then failing stylus compilation. Indeed, this stylus example compiles while this one does not.

Hence, we should perform a more robust check on whether the colon should be preserved.

I'll try to do to the PR according to your philosophy.

Best regards,

@qnp
Copy link
Author

qnp commented Feb 5, 2021

I am working on a PR and I discover that such case is not covered too:

border: 1px solid $colors.red

(see this example which does not compile without colon.)

So I will address this issue at the same time.

@qnp
Copy link
Author

qnp commented Feb 5, 2021

Here is the PR => #86

@qnp
Copy link
Author

qnp commented Feb 22, 2021

Hi @ThisIsManta,
Haven't heard from you for a while...hope you are doing well.
Have you had the opportunity to read about this issue and the subsequent PR ?
Best regards

@ThisIsManta
Copy link
Owner

^ sorry, I'm quite packed these days. I'll have a look this coming weekends.

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 a pull request may close this issue.

2 participants