Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@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.
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.