Skip to content

Instantly share code, notes, and snippets.

@mmikhan
Created June 17, 2020 14:12
Show Gist options
  • Save mmikhan/5aa934513388a6e48f44e63648a261d8 to your computer and use it in GitHub Desktop.
Save mmikhan/5aa934513388a6e48f44e63648a261d8 to your computer and use it in GitHub Desktop.
Tailwind CSS `grid-template-columns: auto-fit; grid-template-columns: auto-fill;` and `grid-template-rows: auto-fit; grid-template-rows: auto-fill;`
module.exports = {
purge: [],
theme: {
extend: {
gridTemplateColumns: {
'auto-fit': 'repeat(auto-fit, minmax(0, 1fr))',
'auto-fill': 'repeat(auto-fill, minmax(0, 1fr))',
},
gridTemplateRows: {
'auto-fit': 'repeat(auto-fit, minmax(0, 1fr))',
'auto-fill': 'repeat(auto-fill, minmax(0, 1fr))',
},
},
},
variants: {},
plugins: [],
};
@beckzairov
Copy link

beckzairov commented May 25, 2021

Thnx) 👍

@mohammadxali
Copy link

Thanks, this is so useful and I believe it should be added to tailwind's default configuration. 👍 @adamwathan

@diter14
Copy link

diter14 commented Jul 31, 2022

This deserves to be in Tailwind v3.
Thanks man!

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