Skip to content
This repository was archived by the owner on Jun 12, 2025. It is now read-only.
This repository was archived by the owner on Jun 12, 2025. It is now read-only.

custom breakpoint value in config ignored #210

@jensbambauer

Description

@jensbambauer

Hi,

I tried to change the breakpoints in the config and it doesn't seem to work. I provided a theme just like in the example and all options seem to work as intended except the breakpoints.

const theme = {
    grid: {
        container: {
            xs: 'full',
            sm: 'full',
            md: 45,
            lg: 60,
            xl: 200,
        },
       ...
        breakpoints: {
            xs: 1,
            sm: 33.75,
            md: 42,
            lg: 54,
            xl: 187.5,
        }
    },
}
const Layout = ({ children }: LayoutProps) => {
    return (
        <ThemeProvider theme={theme}>
            <Global styles={styling()} />
            {children}
        </ThemeProvider>
    )
}

The values don't make sense but container.xl works, padding etc works too. grid.breakpoints.xl doesn't change the media query for that breakpoint. I dug around a little and found the following line of code:

const breakpoints = config().grid.breakpoints;

It seems like config() is called without the theme and therefore it uses the defaults.

Is this behaviour intended? It doesn't make sense to me. Would be happy to hear from you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions