Super curious what the technical hangup was on that.
Not much of a story, just haven't had the chance to do it 馃し
I think we just need to generate a js object of this from screens in config:
.container {
width: 100%
}
@media (min-width: 640px) {
.container {
max-width: 640px
}
}
@media (min-width: 768px) {
.container {
max-width: 768px
}
}
@media (min-width: 1024px) {
.container {
max-width: 1024px
}
}
@media (min-width: 1280px) {
.container {
max-width: 1280px
}
}
Ah okay, no worries then. Just seemed weird that single class didn't work. Was just curious.
Decided to finally add support for container, it will be in the next version.
I'm also adding a container-auto class to automatically centre the container instead of having to add mx-auto.
Decided to finally add support for
container, it will be in the next version.
I'm also adding acontainer-autoclass to automatically centre the container instead of having to addmx-auto.
It is possible to override this in the tailwind configuration file, in case you missed it in the documentation: https://tailwindcss.com/docs/container/#customizing
I did notice that, and that'll be supported too!
That configurable one adds padding. The mx-auto adds margins. Easy to confuse the two 馃憤
Awesome! Dunno about adding _any_ new classes though. Bit of a smell.
I don't see it the same way, there's zero filesize added to your app until you use it
Yeah I'm not worried about filesize鈥攁nd I'm being nitpicky so feel free to ignore this鈥攂ut when you add your own classes to a pre-existing lib, you add unpredictable stuff to it.
Example scenario: Someone knows Tailwind really well. They go to create a custom container-auto class like they always have, and maybe this class does different stuff than the one in twin.macro... Now they have a bug in their app and it's tricky to figure out because twin.macro was only supposed to extend Tailwind.
I'm being dogmatic, and I know how annoying I'm being, but it _is_ a smell that all lib maintainers should try to avoid.
If you want to add your own utility classes/helpers/etc then create a lib with just that focus. That's exactly what Tailwind plugins are for.
I know container-auto isn't really going to hurt anyone, but figured I'd offer some unsolicited advice.
Most helpful comment
Decided to finally add support for
container, it will be in the next version.I'm also adding a
container-autoclass to automatically centre the container instead of having to addmx-auto.