-
Notifications
You must be signed in to change notification settings - Fork 99
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
Media Query sass-like mixin #16
Comments
Well.. after a long trial and error phase we found the following: This code did not work:
together with
Although in my opinion it is the exact same thing they are doing here After playing around we found out that adding the following did the trick:
I therefore ended up with:
and
I also tested it with further nested functions. like this for example:
I use the px to rem function from https://github.com/styled-components/polished Another nice thing about writing
Is that the atom language-babel package highlights the css within the js file correctly when it gets the Unfortunately this stops after
And writing
is making the file look nicer because of correct css syntax highlighting, but breaks the functionality again. Maybe you have some input for that. Even better would be if someone could explain me what exactly happens, and what goes wrong when using the proposed code from styled components. Cheers |
Thank you @Jones-S I'll take a look on that :) |
Looking for a similar implementation. Any update on this? @liqueflies |
`. // tools.mediaqueries.js
After messing up a bit this working |
@tollswap any chance you have this working with typescript? |
Maybe this is not an issue at all, but I don't know what the reason could be for my missing functionality.
I am trying to get this to work for quite some time now:
https://github.com/styled-components/styled-components/blob/master/docs/tips-and-tricks.md#more-powerful-example
I use the exact same code (except that I import
import { css } from 'vue-styled-components'
, but somehow the wrapped code${css(...args)}
withinis not executed, or at least the rules dont show up in my styles. Is this a problem of vue-styled-components or am I just missing something out?
thanks for the help.
The text was updated successfully, but these errors were encountered: