Skip to content

Instantly share code, notes, and snippets.

@Greenheart
Created December 12, 2022 22:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Greenheart/7242428baf948aaf6d3a1af10c161ced to your computer and use it in GitHub Desktop.
Save Greenheart/7242428baf948aaf6d3a1af10c161ced to your computer and use it in GitHub Desktop.
Tailwind CSS 3 text-shadow plugin
// Credit to plugin solution and making it show up in editor intellisense:
// https://github.com/tailwindlabs/tailwindcss-intellisense/issues/227#issuecomment-1221083129
const plugin = require('tailwindcss/plugin')
const textShadowPlugin = plugin(({ addUtilities }) => {
addUtilities({
'.text-shadow': {
'text-shadow': '1px 1px 1px #0000003f',
},
})
})
// Usage: Add to the `plugins` array in tailwind.config.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment