Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@jill64/tailwind-grid-auto

Package Overview
Dependencies
Maintainers
1
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jill64/tailwind-grid-auto

A Tailwind CSS plugin for automatically adjusting the size of grid track based on a specified number

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12K
increased by31.09%
Maintainers
1
Weekly downloads
 
Created
Source

tailwind-grid-auto

npm version

A Tailwind CSS plugin for automatically adjusting the size of grid track based on a specified number.

Install

npm i @jill64/tailwind-grid-auto
// tailwind.config.js
module.exports = {
  theme: {
    // ...
  },
  plugins: [
    require('@jill64/tailwind-grid-auto')
    // ...
  ]
}

Usage

<div class="inline-grid cols-auto-2">
  <div>--Short--</div>
  <div>--Short--</div>
  <div>----Medium----</div>
  <div>------Long------</div>
  <div>------Long------</div>
  <div>--------ExLong--------</div>
</div>

Show as

--Short----Short--
----Medium----------Long------
------Long--------------ExLong--------

Configuration

NameCSS
cols-auto-1grid-template-columns: repeat(1, auto)
cols-auto-2grid-template-columns: repeat(2, auto)
cols-auto-3grid-template-columns: repeat(3, auto)
cols-auto-4grid-template-columns: repeat(4, auto)
cols-auto-5grid-template-columns: repeat(5, auto)
cols-auto-6grid-template-columns: repeat(6, auto)
cols-auto-7grid-template-columns: repeat(7, auto)
cols-auto-8grid-template-columns: repeat(8, auto)
cols-auto-9grid-template-columns: repeat(9, auto)
rows-auto-1grid-template-rows: repeat(1, auto)
rows-auto-2grid-template-rows: repeat(2, auto)
rows-auto-3grid-template-rows: repeat(3, auto)
rows-auto-4grid-template-rows: repeat(4, auto)
rows-auto-5grid-template-rows: repeat(5, auto)
rows-auto-6grid-template-rows: repeat(6, auto)
rows-auto-7grid-template-rows: repeat(7, auto)
rows-auto-8grid-template-rows: repeat(8, auto)
rows-auto-9grid-template-rows: repeat(9, auto)

You can configure which values are available for this plugin under the gridAuto key in your tailwind.config.js file:

// tailwind.config.js
module.exports = {
	theme: {
		extend: {
			gridAuto: {
				10: '10'
				11: '11'
				12: '12'
			}
		}
	}
}

Alternatively, you can use square bracket notation.

NameCSS
cols-auto-[n]grid-template-columns: repeat(n, auto)
rows-auto-[n]grid-template-rows: repeat(n, auto)

Keywords

FAQs

Package last updated on 07 Sep 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc