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

del comments/default value () #18

Closed
cddsgtc opened this issue Nov 23, 2017 · 8 comments
Closed

del comments/default value () #18

cddsgtc opened this issue Nov 23, 2017 · 8 comments
Labels

Comments

@cddsgtc
Copy link

cddsgtc commented Nov 23, 2017

when format the file ,it will remove comments and also will remove some variables' value like conditions = ()

@ThisIsManta
Copy link
Owner

Could you share the file that got comments removed?

I don't quite understand why one wants to write conditions = (). Would you enlighten me?

@cddsgtc
Copy link
Author

cddsgtc commented Nov 25, 2017

@ThisIsManta
this's part of the code.

$media_queries = {
  xs: 'only screen and (max-width: 374px)',
  sm: 'only screen and (min-width: 375px) and (max-width: 7678px)',
  md: 'only screen and (min-width: 769px)',
  lg: 'only screen and (min-widht: 1366px)'
};

$media($breakpoint) {
  conditions = ();//this is the line

  for $breakpoint in $media_queries {
    push(conditions, $media_queries[$breakpoint]);
  }

  conditions = join(',', conditions);

  @media conditions {
    {block};
  }
}

@ThisIsManta
Copy link
Owner

Could you make your sample code above work in http://stylus-lang.com/try.html, please?

Would you confirm if writing conditions = (); means an empty array?

@cddsgtc
Copy link
Author

cddsgtc commented Dec 4, 2017

@ThisIsManta that's just some conditions string words and join the array items from $breakpoint, because there are no default empty value in the stylus,so define it as a empty mixin.
the origin code is here.

@ThisIsManta
Copy link
Owner

This is fixed in version 2.7.0.

@cddsgtc, sorry that it took so long to fix this bug. I was terribly busy.

@cddsgtc
Copy link
Author

cddsgtc commented Dec 31, 2017

@ThisIsManta im waiting this for so lang and get it and update at first time, it help me a lot ,thank you so much too.
you should take a rest at the new year days.
新年快乐!happy new year!
but i still working π_π。

@daviscabral
Copy link

I am experiencing this on Atom - do I need to do anything special to have this working?

@ThisIsManta
Copy link
Owner

Bad news. Even though Atom package (extension) is mentioned in our official website, we stopped updating Stylus Supremacy engine many months ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants