twobj
TypeScript icon, indicating that this package has built-in type declarations

2.5.6 • Public • Published

twobj

Convert tailwind declarations to a style object

Getting Started

import { createContext, resolveConfig } from "twobj"

const c = createContext(resolveConfig())

const output = c.css("[& :first-of-type]:(text-cyan-500 sm:text-pink-500)")

output => {
  "& :first-of-type": {
    "color": "#06b6d4",
    "@media (min-width: 640px)": {
      "color": "#ec4899"
    }
  }
}

Plugin feature

Tailwind plugin is supported.

resolveConfig({
  plugins: [
    function ({ addUtilities, matchUtilities, ... }) {

    }
  ]
})

Readme

Keywords

none

Package Sidebar

Install

npm i twobj

Weekly Downloads

4

Version

2.5.6

License

none

Unpacked Size

844 kB

Total Files

10

Last publish

Collaborators

  • lightyen