tailwindcss-simple-grid

0.0.2 • Public • Published

tailwindcss-simple-grid

const grid = require('tailwindcss-simple-grid')

module.exports = {
  theme: {
    width: theme => ({
      auto: 'auto',
      full: '100%',
      ...grid(theme)
    }),
    margin: theme => ({
      ...grid(theme),
      ...grid.negative(theme)
    }),
    grid: {
      columns: 12,
      gutter: 32,
      container: {
        maxWidth: 1280,
        gutter: {
          _: 25,
          md: 50
        }
      }
    }
  },
  plugins: [grid],
  corePlugins: {
    container: false
  }
}

Output

.container {
  width: 100%;
  max-width: 1280px;
  padding-left: 25px;
  padding-right: 25px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 768px) {
  .container {
    padding-left: 50px;
    padding-right: 50px;
  }
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -16px;
  margin-right: -16px;
}

.col {
  width: 100%;
  flex: none;
  padding-left: 16px;
  padding-right: 16px;
}

Readme

Keywords

Package Sidebar

Install

npm i tailwindcss-simple-grid

Weekly Downloads

32

Version

0.0.2

License

MIT

Unpacked Size

3.99 kB

Total Files

4

Last publish

Collaborators

  • bradlc