<Box /> responsiveBreakpoint not functional
See original GitHub issuechanging 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:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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 thecolumn
direction fromrow-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 themedium
sizes when the screen is in that size range, even if we have a responsiveBreakpoint ofsmall
. For now, just to avoid crashing, I think either add the exact same values tomedium
as already defined forsmall
, or have checks in the code to avoid the crashing.This issue was fixed in #4644 so I think this issue can be closed