Package Exports
- tailwindcss-border-gradients
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tailwindcss-border-gradients) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Tailwind CSS Border Gradients Plugin
This plugin is based on the tailwindcss-gradients plugin. Usage is the same, it just outputs border-image gradients, instead of background-image.
Installation
npm install tailwindcss-border-gradientsUsage
// In your Tailwind CSS config
{
plugins: [
require('tailwindcss-border-gradients')({
variants: ['responsive'],
directions: {
't': 'to top',
'r': 'to right',
'b': 'to bottom',
'l': 'to left',
},
gradients: {
'red': '#f00',
'red-blue': ['#f00', '#00f'],
'red-green-blue': ['#f00', '#0f0', '#00f'],
},
}),
],
}This plugin generates the following utilities:
/* configurable with the "directions" and "gradients" options */
.border-gradient-[direction-name]-[gradient-name] {
border-image: linear-gradient([direction-value], [gradient-color-1], [gradient-color-2], [...]) 1;
}directions is optional and it defaults to:
{
't': 'to top',
'tr': 'to top right',
'r': 'to right',
'br': 'to bottom right',
'b': 'to bottom',
'bl': 'to bottom left',
'l': 'to left',
'tl': 'to top left',
}