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

Setting the default width for the preview viewport in url #204

Open
alienlebarge opened this issue Feb 1, 2017 · 6 comments
Open

Setting the default width for the preview viewport in url #204

alienlebarge opened this issue Feb 1, 2017 · 6 comments

Comments

@alienlebarge
Copy link

alienlebarge commented Feb 1, 2017

Hello there,
I was wondering if there was a way to make links by specifying the width of the viewport as patternlab does.

This is something we often use when we send a link for validation. Our users are not so up to date with the concept of "Mobil First”. 😬

@alienlebarge alienlebarge changed the title Setting the default width for the preview viewport Setting the default width for the preview viewport in url Feb 1, 2017
@eknowles
Copy link

eknowles commented Feb 3, 2017

What you could do is use the display property in the config (http://fractal.build/guide/components/configuration) CTRL+F max-width and then in the config make a new variant with this display property.

@alienlebarge
Copy link
Author

@eknowles Thank you, I had not thought of this solution. This is a nice idea.

But I would have preferred something more straightforward that could be transmitted via the URL.
This is the kind of link that is sent to the client with the message

hey! Check this design on mobile
http://myurl/components/detail/article?w=320

@eknowles
Copy link

eknowles commented Feb 5, 2017

How about doing it with JavaScript on the preview file?

Use window.location.search to grab the ?w=123 and then set it with style. Just smack a script tag before the end of the body that grabs the query string.

@allmarkedup
Copy link
Member

Sorry for the slow reply - it's not possible at the moment (apart from in the ways that @eknowles has mentioned) but it is definitely something that could be added in in the future. It would really be a Mandelbrot theme feature so if you wanted to open a feature request for it over on that repo we can track it over there.

@alienlebarge

This comment has been minimized.

@stale
Copy link

stale bot commented Jul 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the inactive label Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants