• I’m making a custom Gutenberg based theme. I’d like to allow the creation of custom breakpoints. Does Gutenberg have a built-in way to handle this? Or will I have to just create a page on the backend to configure these and store them in something like wp_options?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Breakpoints for what process? Please describe in general terms what you’re actually trying to accomplish. How would creating a page accomplish this, even though you’d rather not go there?

    Thread Starter oguruma

    (@oguruma)

    @bcworkz I’m talking about breakpoints (based on viewport width, basically) for media queries, basically. For instance, suppose one user wants to move from 50/50 column width at 1167px and another user wants to do so at 1025px. In other words, one user might want to treat viewports of < 1167px as being a “tablet” screen size and others might want to treat viewports of 1025px as being a tablet screen, for the purpose of responsive design.

    I have no objection to using a backend page, that’s what I’ve done in the past. I’m a novice when it comes to working with Gutenberg, so I’m mainly asking if Gutenberg has some built-in way, or some way to allow the user to change that within the Gutenberg interface, rather than doing it on the backend.

    It would make sense if there was a way to manage that in the Gutenberg > Design/Styles interface, since that is where things like typography and colors are managed.

    Moderator bcworkz

    (@bcworkz)

    Oh those breakpoints! I had an entirely different sort in mind ?? Thanks for clarifying. I have limited experience with block styling within the editor, but I don’t recall ever seeing such an option in block styling dialogs. I think a lot of people creating content for their WP sites wouldn’t know how to set them up anyway. The default block style.css has very limited breakpoints. AFICT it’s the responsibility of the theme to set reasonable breakpoints. IMO it should not fall to content creators to manage them.

    If you wish your theme’s end users to manage breakpoints, maybe you could provide an overall settings page or something to collect input. Then use that input to dynamically generate appropriate CSS?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.