
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@shrutibalasa/tailwind-grid-auto-fit
Advanced tools
Tailwind CSS utility classes for creating responsive grid columns without media queries using auto fit.
A plugin that helps you create a responsive grid layout in Tailwind CSS without using media queries. It uses the auto-fit
keyword in the grid-template-columns
CSS property to help you do the same.
Install it in a new or existing Tailwind CSS project
npm install -D @shrutibalasa/tailwind-grid-auto-fit
Then add the plugin to your tailwind.config.js
file:
module.exports = {
theme: {
// ...
},
plugins: [
require('@shrutibalasa/tailwind-grid-auto-fit'),
// ...
],
}
Use the class grid-auto-fit
along with grid
class to create a responsive grid layout.
<section class="grid gap-4 grid-auto-fit">
<div class="p-4 bg-blue-100 rounded-md">
Item 1
</div>
<div class="p-4 bg-blue-100 rounded-md">
Item 2
</div>
<div class="p-4 bg-blue-100 rounded-md">
Item 3
</div>
<div class="p-4 bg-blue-100 rounded-md">
Item 4
</div>
<div class="p-4 bg-blue-100 rounded-md">
Item 5
</div>
<div class="p-4 bg-blue-100 rounded-md">
Item 6
</div>
<div class="p-4 bg-blue-100 rounded-md">
Item 7
</div>
</section>
Use utilities like .grid-auto-fit-sm
, .grid-auto-fit-xl
to change the minimum and maximum item size of the responsive grid. This plugin includes five item sizes with the default minimum size being 16rem.
Class | Minimum item width |
---|---|
grid-auto-fit-xs | 12rem |
grid-auto-fit-sm | 14rem |
grid-auto-fit or grid-auto-fit-md | 16rem |
grid-auto-fit-lg | 18rem |
grid-auto-fit-xl | 20rem |
This plugin supports the use of arbitrary values if you want a custom minimum item size
<section class="grid grid-auto-fit-[13rem]">
...
</section>
FAQs
Tailwind CSS utility classes for creating responsive grid columns without media queries using auto fit.
The npm package @shrutibalasa/tailwind-grid-auto-fit receives a total of 482 weekly downloads. As such, @shrutibalasa/tailwind-grid-auto-fit popularity was classified as not popular.
We found that @shrutibalasa/tailwind-grid-auto-fit demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.