Skip to content

Conversation

@stidges
Copy link
Contributor

@stidges stidges commented May 12, 2019

This PR fixes an issue where using the .container class with custom screen breakpoints would result in the container always having a max-width of the last defined screen. Additionally, when multiple screens would have the same min-width, the container definition would be duplicated.

I ran into this when using the following tailwind.config.js:

module.exports = {
  important: true,
  theme: {
    extend: {
      screens: {
        'sm-only': { min: '640px', max: '767px' },
      },
    },
  },
  variants: {},
  plugins: [],
};

In this case, the .container class would always have max-width: 640px defined, because it is the last defined breakpoint for the class. It would also result in duplication of the @media (min-width: 640px) breakpoint definition.

@adamwathan adamwathan merged commit 6c2f3b9 into tailwindlabs:next May 13, 2019
@adamwathan
Copy link
Member

Thanks @stidges!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants