-
Notifications
You must be signed in to change notification settings - Fork 205
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
Documentation for customization #87
Comments
I'm not sure if this feature would be within the scope of this library. It is meant to only be a React wrapper around flexboxgrid, which doesn't offer this kind of customization. I see why people would want to customize it, but currently I don't have any idea how to achieve this. Does anybody else? flexboxgrid/src/css/flexboxgrid.css uses variables, maybe we could somehow use that, but it sounds very tricky. |
Thanks for your reply. $container-width: 1280px;
$container-gutter: 10px;
$breakpoint-sm: 960px; // default 768px
$breakpoint-md: 1024px; // default 1024px
$breakpoint-lg: 1280px; // default 1280px
$breakpoint-xlg:1920px; // default 1920px
.grid {
max-width: $container-width;
padding-right: $container-gutter/2;
padding-left: $container-gutter/2;
.col {
padding: $container-gutter;
@media (max-width: $breakpoint-sm - 1px) {
max-width: 100%;
flex-basis:100%;
}
}
} |
Yeah, this is probably a pain, because you have to understand how |
I think CSS Modules support complicate our lives a bit, it would probably be much easier otherwise. |
Hi! I faced this issue recently, and I was able to override the variables using
And then, in that custom file:
Hope this can be usefull! |
Any idea how to do this on the latest version that uses flexboxgrid2? |
I think one way would be to have more properties on Row and Col to allow more flexibility. I will try to have a look. |
This affects my usage of the component. Seeing that react-flexbox-grid consumes plain CSS from flexboxgrid2, it's not straightforward to override CSS4 variables programmatically. I was thinking of approaching this problem a couple ways:
If either of these proposals seem attractive, let me know and I'll be glad to contribute. |
I just created a CSS-in-JS version that can be easily customized by passing an object: const gridConfig = {
gutterWidth: 16,
outerMargin:8
}
<div className={ FlexGrid.grid(gridConfig)}> </div> Let me know what you think: https://github.com/LaloMrtnz/flexgrid-js 😛 |
Hi, thanks for the great grid system. It's very nice to use right out of the box, but it's hard to figure out where to start to modify some settings, for example gutter size between boxes.
It would be nice to have a detailed instruction or more examples.
The text was updated successfully, but these errors were encountered: