Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] CSS Grid - Auto-Fit & Auto-Fill #1403

Closed
rexdesigndk opened this issue Feb 28, 2020 · 6 comments
Closed

[Feature request] CSS Grid - Auto-Fit & Auto-Fill #1403

rexdesigndk opened this issue Feb 28, 2020 · 6 comments

Comments

@rexdesigndk
Copy link

rexdesigndk commented Feb 28, 2020

So happy that Tailwind finally have css grid support built-in 馃憤
The only thing i've been missing, when working with tailwinds grid utilities are Auto-Fit & Auto-Fill
Any plans to add them in the future?

@rexdesigndk rexdesigndk changed the title CSS Grid - Auto-Fit & Auto-Fill [Feature request] CSS Grid - Auto-Fit & Auto-Fill Feb 28, 2020
@tlgreg
Copy link

tlgreg commented Feb 29, 2020

The keywords can be used in the config eg in gridTemplateColumns.

module.exports = {
  theme: {
    gridTemplateColumns: {
      'fill-40': 'repeat(auto-fill, 10rem)',
    },
  },
}

https://tailwindcss.com/docs/grid-template-columns#customizing

Just a little notice, there is a bug currently in Firefox with auto-fit and auto-fill:
https://bugzilla.mozilla.org/show_bug.cgi?id=1341507

@adamwathan
Copy link
Member

Thanks glad you are digging the grid support! Like @tlgreg mentioned you can add this in your config if you need it, think we'll keep it out of core for now as I'm not sure there are any real sensible defaults we could include.

@anthonylebrun
Copy link

I think this feature request might be worth revisiting with the new JIT compiler ^ :)

@jvanderen1
Copy link

@adamwathan Is this something on the teams radar? 馃憖

@Yoda-Soda
Copy link

Yoda-Soda commented May 2, 2022

A revisit would be great. I am a heavy user of grid and no auto-fit and auto-fill hamstrings grid severely. Defaults could be something like grid-fill-6 = grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)), grid-fill-80 = grid-template-columns: repeat(auto-fill, minmax(320px, 1fr))

@jvanderen1
Copy link

I started a discussion thread #8705.

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

No branches or pull requests

6 participants