question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

<Box /> responsiveBreakpoint not functional

See original GitHub issue

changing the value of responsiveBreakpoint to anything different from ‘small’ generating crash.

desired behavior is to implement the borderSize, edgeSize for medium and large in base theme, similar to already implemented small https://github.com/grommet/grommet/blob/d6c3a7f83c9fc3dea641eafac16ac87ba2121890/src/js/themes/base.js#L124

const theme = {
  box: {
    responsiveBreakpoint: "medium"
  }
};

    <Grommet theme={theme}>
      <Box background="brand" pad="large" />
    </Grommet>

code sandbox https://codesandbox.io/s/pj8175227j

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
atanasstercommented, Feb 28, 2019

@oorestisime the current use of global.edgeSize, global.borderSize is when responsive is false and also in several cases where it’s hard-coded, while the small breakpoint - when Box turns into the column direction from row-responsive. Imho it would be best to have those spacings/borders adapt not only when the breakpoint is switched, but for all sizes depending on the current screen size. For example use the medium sizes when the screen is in that size range, even if we have a responsiveBreakpoint of small. For now, just to avoid crashing, I think either add the exact same values to medium as already defined for small, or have checks in the code to avoid the crashing.

0reactions
jcfilbencommented, Mar 3, 2021

This issue was fixed in #4644 so I think this issue can be closed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Javascript Responsive Breakpoints Are Not Working
Save this question. Show activity on this post. I have set some responsive breakpoints in javascript but they arent registering and changing ...
Read more >
Responsive breakpoints not working properly - Drupal
I've set up breakpoints for responsive design which say that for screens below 768px, the carousel should display only one slide.
Read more >
Responsive Context - Grommet
Responsive Context. a means of providing different rendering behavior based on the viewport size. small. 1. 2. 3. 4. 5. 6. 7. 8....
Read more >
Responsive Styles - Styled System
Often when working on responsive layouts, it's useful to adjust styles along a singular ... <Box width={[ 1, // 100% below the smallest...
Read more >
Overview - Bootstrap
Choose from a responsive, fixed-width container (meaning its max-width changes at ... No media query necessary for xs breakpoint as it's effectively `@media ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found