-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
@material-ui/system - Add Grid support #15878
Comments
One simple workaround is to create a custom component with custom style props. For example: import { styled } from '@material-ui/styles';
import { style, compose } from '@material-ui/system';
export default styled('div')(
compose(
style({ prop: 'gridTemplateColumns' }),
style({ prop: 'gridGap', themeKey: 'spacing' }),
() => ({
display: 'grid',
})
)
); This way it's even possibe to use the spacing logic for <Grid
gridGap={[2, 3]}
gridTemplateColumns="repeat(auto-fill, minmax(13rem, 1fr))"
>
...
</Grid> |
Just do it in your styled components. To reflect every aspect and features into components would be complete insane. Use grid wise! |
@sourcewars This is only for the |
Provides the foundations for mui#15878
Provides the foundations for mui#15878
Expected Behavior 🤔
Similar to flexbox, it would be nice if CSS Grid properties were supported with
@material-ui/system
/@material-ui/core/Box
like styled-system does.Current Behavior 😯
No support for CSS Grid properties like
gridTemplateColumns
,rowGap
, etc.Examples 🌈
The text was updated successfully, but these errors were encountered: