You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
This plugin adds utilities to usetext-fill,text-stroke andpaint-order with Tailwind CSS.
Note
Now with support for TailwindCSS v3 and arbitrary values and variants ✨
Installation
Add this plugin to your project:
# Install using pnpmpnpm install --save-dev tailwindcss-text-fill-stroke# Install using npmnpm install --save-dev tailwindcss-text-fill-stroke# Install using yarnyarn add -D tailwindcss-text-fill-stroke
Usage
By default the plugin uses theborderColor andborderWidth properties from your theme to generate all of its classes. You can change that to whatever, just keep in mind if you have adefault key in both objects,.text-stroke will set both the-webkit-stroke-color and-webkit-stroke-width of the element.
// tailwind.config.js{theme:{// defaults to these valuestextFillColor:theme=>theme('borderColor'),textStrokeColor:theme=>theme('borderColor'),textStrokeWidth:theme=>theme('borderWidth'),paintOrder:{'fsm':{paintOrder:'fill stroke markers'},'fms':{paintOrder:'fill markers stroke'},'sfm':{paintOrder:'stroke fill markers'},'smf':{paintOrder:'stroke markers fill'},'mfs':{paintOrder:'markers fill stroke'},'msf':{paintOrder:'markers stroke fill'},},},plugins:[require('tailwindcss-text-fill-stroke'),// no options to configure],}