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

[FEAT] Responsive options for different viewports #133

Open
wilbertcaba opened this issue Jan 24, 2020 · 1 comment
Open

[FEAT] Responsive options for different viewports #133

wilbertcaba opened this issue Jan 24, 2020 · 1 comment

Comments

@wilbertcaba
Copy link

Is your feature request related to a problem? Please describe.
For an specific project I am working on, setting the gutterPixels to 30px seems reasonable for desktop viewports, but on mobile is way too much padding.

Describe the solution you'd like
I wish I could do something like:

const filterOptions = {
    gutterPixels: 30,
    responsive: [
    {
      breakpoint: 991,
      settings: {
        gutterPixels: 20,
        // other options
      }
    },
    {
      breakpoint: 767,
      settings: {
        gutterPixels: 10,
        // other options
      }
    },
}

Describe alternatives you've considered
JS conditional statements would work.

@giotiskl
Copy link
Owner

@wilbertcaba there is no need for this to be implemented as a separate feature as you could achieve this with Filterizr now just fine.

Simply register an onResize event on the window object and when the width of the window hits your desired breakpoints call the filterizr.setOptions method to set your desired gutter for the new window width.

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