Skip to content
New issue

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

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

Already on GitHub? # to your account

[Bug Report] Error when using media query with a hash getter #18

Closed
l1qu1d opened this issue Jan 15, 2018 · 5 comments
Closed

[Bug Report] Error when using media query with a hash getter #18

l1qu1d opened this issue Jan 15, 2018 · 5 comments
Labels

Comments

@l1qu1d
Copy link

l1qu1d commented Jan 15, 2018

I have break points that are predefined in a hash object that I use with @media queries. I use the VsCode extension and it won't format my stylus code when using the below code.

When I use a hash getter on the media query I get, "ERROR: Found an input node of null".

Steps to reproduce

Example code:
@media $display-breakpoints.md-and-up { }

Example hash:
$display-breakpoints := { md-and-up: "only screen and (min-width: %s)" % $grid-breakpoints.md }

To recreate the error just go to https://thisismanta.github.io/stylus-supremacy/ and go to the section "Try it in your browser". Paste the media query example code above.

@ThisIsManta
Copy link
Owner

Could you give me the full example code which works in http://stylus-lang.com/try.html please?

@l1qu1d
Copy link
Author

l1qu1d commented Jan 18, 2018

Here is the example code: stylus-lang.com example

@ThisIsManta
Copy link
Owner

Could you verify my fix by installing the side-load extension?
https://1drv.ms/u/s!AopesDuNO8ZogtBUIAk4nqxhI9cOAw

Instructions can be found at https://code.visualstudio.com/docs/editor/extension-gallery#_install-from-a-vsix

Once the side-load extension has been installed, try repeating the issue above.

ThisIsManta added a commit that referenced this issue Jan 18, 2018
@l1qu1d
Copy link
Author

l1qu1d commented Jan 18, 2018

It works if the code is in its own .styl file now, but doesn't work if you're using it in a single file app like Vuejs.

Example: <style lang="stylus" scoped> @media $display-breakpoints.md-and-up { } </style>

I'm using your plugin along with Vetur plugin for VsCode.

@ThisIsManta
Copy link
Owner

ThisIsManta commented Jan 18, 2018

Vetur extension must be updated separately.

For Stylus Supremacy, please upgrade to version 2.7.2 now.
For Vetur, please wait for PR vuejs/vetur#659 to be merged.

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

No branches or pull requests

2 participants