Skip to content

CSS Property values to Tailwind utilities mapping data

License

Notifications You must be signed in to change notification settings

robhowell/tailwind-mappings

 
 

Repository files navigation

tailwind-mappings

Build and Deploy npm version Coverage Status

CSS Property values to Tailwind utilities mapping data

Install

npm install --save tailwind-mappings

Usage

const { TAILWIND_CLASSES } = require('tailwind-mappings');

const decl = {
  prop: 'display',
  value: 'block'
};

const tailwindClass = TAILWIND_CLASSES[decl.prop][decl.value];
// => 'block'

const decl2 = {
  prop: 'padding',
  value: '0px'
};

const tailwindClass = TAILWIND_CLASSES[decl2.prop][decl2.value];
// => 'p-0'

About

CSS Property values to Tailwind utilities mapping data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • JavaScript 100.0%