npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@konnng/tailwind-content-column

v1.0.0

Published

A plugin which adds utilities to use all content column properties with Tailwind CSS

Downloads

2

Readme

@konnng/tailwind-content-column

A plugin that provides support to content columns on Tailwind.

Supports the following CSS Properties:

  • https://developer.mozilla.org/en-US/docs/Web/CSS/column-count
  • https://developer.mozilla.org/en-US/docs/Web/CSS/column-fill
  • https://developer.mozilla.org/en-US/docs/Web/CSS/column-gap
  • https://developer.mozilla.org/en-US/docs/Web/CSS/column-rule-color
  • https://developer.mozilla.org/en-US/docs/Web/CSS/column-rule-style
  • https://developer.mozilla.org/en-US/docs/Web/CSS/column-rule-width
  • https://developer.mozilla.org/en-US/docs/Web/CSS/column-span
  • https://developer.mozilla.org/en-US/docs/Web/CSS/column-width

Installation

Install the plugin from npm:

npm install -D @konnng/tailwind-content-column

Then add the plugin to your tailwind.config.js file.

// tailwind.config.js

/** @type {import('tailwindcss').Config} */
module.exports = {
  theme: {
    extend: {
      // ...
    },
  },
  plugins: [
    require('@konnng/tailwind-content-column'),
    // ...
  ],
};

Available theme configuration

{
  colCount: {},
  colFill: {},
  colGap: {},
  colRuleColor: {},
  colRuleStyle: {},
  colRuleWidth: {},
  colSpan: {},
  colWidth: {},
}

Note It is not recommended to change colFill, colRuleStyle and colSpan, since both use their own values from CSS specification.

Example:

// tailwind.config.js

/** @type {import('tailwindcss').Config} */
module.exports = {
  theme: {
    extend: {
      colCount: {
        sm: '425px',
        //...
      },
      colRuleColor: {
        secondary: '#c6c6c6',
        //...
      },
      colRuleWidth: {
        px: '1px',
      },
      colWidth: {
        xs: '120px',
      },
    },
  },
  plugins: [
    require('@konnng/tailwind-content-column'),
    // ...
  ],
};

The above configuration will generate the following classes:

  • col-count-sm
  • col-rule-secondary
  • col-rule-width-px
  • col-width-xs

Available class utilities

| Utility | CSS property | Description | | ------------------ | ----------------------------- | ------------------------------------------------------------------------------------------------- | | col-count-[SIZE] | column-count: [SIZE]; | Sizes from tailwind column config doc | | col-fill-[VALUE] | column-fill: [VALUE]; | Available values doc | | col-gap-[SIZE] | column-gap: [SIZE]; | Sizes from tailwind gap config doc | | col-rule-[COLOR] | column-rule-color: [COLOR]; | Colors from tailwind color config doc | | col-rule-[STYLE] | column-rule-style: [STYLE]; | Available styles doc | | col-rule-[SIZE] | column-rule-width: [SIZE]; | sizes from tailwind border config doc | | col-span-[VALUE] | column-span: [VALUE]; | Available values doc | | col-width-[SIZE] | column-width: [SIZE]; | Sizes from tailwind width config doc |

Usage

Set content column to 2 and with a gap between columns.

<p class="col-count-2 col-gap-4">
  This is a bunch of text split into two columns using the CSS
  <code>column-count</code>
  property. The text is equally distributed over the columns.
</p>