Skip to content

Latest commit

 

History

History

rect

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

rect

This plugin has been deprecated. Consider using new size utilities in Tailwind 3.4 instead.

This plugin adds rect (width + height) sizing utilities to Tailwind.

Usage

const plugins = require('@viget/tailwindcss-plugins')

module.exports = {
  theme: {
    rect: {
      target: [44, 44],
      '24': [24, 24],
    },
  },
  plugins: [
    plugins.rect,
    // ...
  ],
}

The above configuration would create the following css, as well as their responsive variants:

.rect-target {
  width: 2.75rem;
  height: 2.75rem;
}
.rect-24 {
  width: 1.5rem;
  height: 1.5rem;
}