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

Responsive gutters create NaN Values #12

Open
X-Tender opened this issue Mar 12, 2019 · 3 comments
Open

Responsive gutters create NaN Values #12

X-Tender opened this issue Mar 12, 2019 · 3 comments

Comments

@X-Tender
Copy link
Contributor

Compile with responsive-gutter=true from the responsive-gutter-fix pull request and look at the output.

the Issue could be somewhere in the getGutterValueMethod.
You do:

value = settings.responsiveGutter ? (value / Math.floor(referenceWidth)) * 100 : value;

But thereferenceWidth is NaN when it comes in.

@martenzander
Copy link
Owner

@X-Tender as mentioned in the docs you need to have a viewport property set in the default grid settings

To make this feature work you have to set a viewport context even in your default settings of the grid.

Add viewport: 375px; for example and try again. This value is required to calculate relative gutter values.

Maybe adding a default viewport value for the base viewport could help here.

@X-Tender
Copy link
Contributor Author

Ok shame on me, I just played around with the properties.
Myb a default value or a warning when using this without a viewport in the base view (or both) lik
Warning! You didn't set a viewport for the Default view, fallback to 375px

@martenzander
Copy link
Owner

Seems appropriate to me.

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

2 participants